/* جدولي الدراسي — builds on library.css (buttons, forms, sheets, dock). */
.sch { --c: var(--plum); }
.sch .wrap { width: min(1320px, 100% - 40px); }

/* ---------- Head ---------- */
.sch-head { position: relative; overflow: hidden; isolation: isolate; color: #fff; padding: 1.5rem 0 1.6rem; background: linear-gradient(180deg, var(--room), var(--room-2)); }
.sch-lamp { position: absolute; z-index: -1; width: 760px; height: 520px; top: -270px; right: -100px; background: radial-gradient(closest-side, rgba(255, 193, 94, .26), rgba(194, 29, 100, .18) 55%, transparent); }
.sch-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.sch-title h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); overflow-wrap: anywhere; }
.sch-title p { color: rgba(255, 255, 255, .7); font-size: 14px; min-height: 1.7em; }
.sch-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.sch-gold { background: var(--lamp); color: #2A1B3D; } .sch-gold:hover { background: #FFD08A; }
.sch-tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-top: 1.2rem; }
.sch-tabs button { display: inline-flex; align-items: center; gap: .45rem; flex-shrink: 0; min-height: 40px; padding: 0 .95rem; border-radius: 13px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; font-size: 14px; cursor: pointer; }
.sch-tabs b { min-width: 22px; padding: 0 .3rem; border-radius: 7px; background: rgba(255, 255, 255, .14); font-size: 11.5px; }
.sch-tabs [aria-selected="true"] { background: #fff; border-color: #fff; color: #2A1B3D; font-weight: 700; } .sch-tabs [aria-selected="true"] b { background: #F3EFF7; }
.sch-newtab { width: 40px; justify-content: center; padding: 0 !important; border-style: dashed !important; }
.sch-stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: .6rem; margin: 1.1rem 0 0; }
.sch-stats div { display: flex; align-items: center; gap: .75rem; min-width: 0; padding: .7rem 1rem; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.sch-stats dd { margin: 0; font-family: var(--f-disp); font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.sch-stats dd .li { width: 28px; height: 28px; }
.sch-stats dt { color: rgba(255, 255, 255, .72); font-size: 12.5px; line-height: 1.45; }
.sch-stats .good dd { color: #67E3B2; } .sch-stats .bad { background: rgba(255, 80, 105, .22); border-color: rgba(255, 120, 140, .55); } .sch-stats .bad dd { color: #FFB3BE; }

/* ---------- Daily / lectures switch ---------- */
.sch-switcher { display: inline-grid; grid-template-columns: 1fr 1fr; gap: .35rem; max-width: 100%; margin-bottom: 1.2rem; padding: .35rem; border-radius: 22px; background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .14); }
.sch-switcher button { display: flex; align-items: center; gap: .7rem; min-width: 0; padding: .55rem 1.2rem; border: 0; border-radius: 17px; background: none; color: #fff; text-align: start; cursor: pointer; transition: background .2s; }
.sch-switcher .li { width: 26px; height: 26px; color: var(--lamp); }
.sch-switcher span { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; } .sch-switcher b { font-size: 14.5px; white-space: nowrap; } .sch-switcher small { opacity: .7; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sch-switcher [aria-selected="true"] { background: #fff; color: #2A1B3D; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); } .sch-switcher [aria-selected="true"] .li { color: #A3134F; }

/* ---------- The daily plan ---------- */
.sch-week { margin: 1.2rem 0 0; }
.sd-days.sch-week button { flex: 1 1 0; min-width: 96px; background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .15); color: #fff; gap: 0; }
.sch-week small { font-weight: 400; font-size: 11px; opacity: .7; white-space: nowrap; }
.sd-days.sch-week button.today { border-color: var(--lamp); }
.sd-days.sch-week button[aria-selected="true"] { background: #fff; border-color: #fff; color: #2A1B3D; }
.dp-now { display: flex; align-items: center; gap: 1.2rem; margin-bottom: 1rem; padding: 1.1rem 1.3rem; border-radius: 26px; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line-2)); background: linear-gradient(270deg, color-mix(in srgb, var(--c) 13%, var(--card)), var(--card) 65%); }
.dp-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.dp-ring svg { width: 100%; height: 100%; rotate: -90deg; } .dp-ring circle { fill: none; stroke-width: 8; stroke: var(--mist); }
.dp-ring circle + circle { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset .6s var(--ease); }
.dp-ring span { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; } .dp-ring b { font-family: var(--f-disp); font-size: 1.35rem; } .dp-ring small { color: var(--mut); font-size: 10.5px; }
.dp-now-t { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dp-now-t small { color: color-mix(in srgb, var(--c) 75%, var(--ink)); font-weight: 700; font-size: 13px; } .dp-now-t b { font-family: var(--f-disp); font-size: 1.55rem; line-height: 1.4; overflow-wrap: anywhere; } .dp-now-t em { font-style: normal; color: var(--mut); font-size: 13px; }
.dp-bar { display: block; width: 100%; max-width: 420px; height: 6px; margin-top: .5rem; border-radius: 6px; background: var(--mist); overflow: hidden; } .dp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.dp-now-a { display: flex; gap: .5rem; flex-wrap: wrap; }
.dp { position: relative; display: grid; gap: .55rem; grid-template-columns: minmax(0, 1fr); }
.dp::before { content: ''; position: absolute; top: 18px; bottom: 18px; right: 85px; width: 2px; background: linear-gradient(var(--line), var(--line-2)); }
.dp-item { position: relative; display: grid; grid-template-columns: 52px 44px minmax(0, 1fr); align-items: center; column-gap: .6rem; scroll-margin-top: calc(var(--hdr) + 20px); }
.dp-time { display: flex; flex-direction: column; align-items: center; line-height: 1.2; } .dp-time b { font-family: var(--f-disp); font-size: 1.1rem; font-variant-numeric: tabular-nums; } .dp-time small { color: var(--faint); font-size: 11px; }
.dp-node { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: color-mix(in srgb, var(--c) 15%, var(--card)); color: color-mix(in srgb, var(--c) 85%, var(--ink)); box-shadow: 0 0 0 4px var(--paper); z-index: 1; }
.dp-node .li { width: 23px; height: 23px; }
.dp-card { display: flex; align-items: center; gap: .5rem; min-width: 0; padding: .35rem; padding-inline-end: .55rem; border-radius: 18px; background: var(--card); border: 1px solid var(--line-2); transition: border-color .2s, box-shadow .2s; }
.dp-main { flex: 1; display: flex; flex-direction: column; min-width: 0; padding: .4rem .65rem; border: 0; background: none; text-align: start; cursor: pointer; }
.dp-main b { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; } .dp-main small { color: var(--mut); font-size: 12.5px; }
.dp-item.k-study .dp-card { background: color-mix(in srgb, var(--c) 8%, var(--card)); border-color: color-mix(in srgb, var(--c) 30%, var(--line-2)); border-right: 6px solid var(--c); }
.dp-item.k-study .dp-node { background: var(--c); color: #fff; }
.dp-item.k-uni .dp-card { border-right: 6px solid var(--c); }
.dp-item.small .dp-node { width: 30px; height: 30px; margin-inline: 7px; border-radius: 10px; } .dp-item.small .dp-node .li { width: 17px; height: 17px; }
.dp-item.small .dp-card { background: transparent; border-style: dashed; border-radius: 14px; padding-block: 0; }
.dp-item.small .dp-main { flex-direction: row; align-items: baseline; gap: .6rem; padding-block: .4rem; flex-wrap: wrap; } .dp-item.small .dp-main b { font-size: 13.5px; font-weight: 500; }
.dp-item.small .dp-time b { font-size: .95rem; color: var(--mut); }
.dp-item.k-sleep .dp-card { color: #fff; border: 0; background: linear-gradient(115deg, #3A2766, #1C1030); } .dp-item.k-sleep .dp-main small { color: rgba(255, 255, 255, .75); } .dp-item.k-sleep .dp-node { background: #2C1A4A; color: #FFC15E; }
.dp-item.live .dp-card { border-color: var(--c); box-shadow: 0 0 0 2px var(--c), 0 16px 30px -20px var(--c); }
.dp-item.live .dp-node { animation: sch-pulse 1.8s ease-out infinite; }
.dp-item.past:not(.done) { opacity: .66; }
.dp-item.done .dp-main b { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--ok); }
.dp-play, .dp-check { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 14px; cursor: pointer; }
.dp-play { border: 0; background: var(--c); color: #fff; } .dp-play .li-f { opacity: .35; }
.dp-check { border: 2px solid var(--line); background: var(--card); color: transparent; transition: background .2s, border-color .2s, scale .2s var(--ease); } .dp-check:hover { border-color: var(--ok); color: var(--faint); }
.dp-check[aria-checked="true"] { background: var(--ok); border-color: var(--ok); color: #fff; } .dp-check:active { scale: .88; } .dp-check .li-s { stroke-width: 3; }
.dp-gap { padding-inline-start: 112px; }
.dp-gap button { display: inline-flex; align-items: center; gap: .3rem; min-height: 36px; padding: 0 .8rem; border: 1px dashed var(--line); border-radius: 11px; background: var(--paper); color: var(--mut); font-size: 12.5px; cursor: pointer; } .dp-gap .li { width: 15px; height: 15px; }
.dp-balance { display: flex; gap: 2px; height: 16px; border-radius: 9px; overflow: hidden; background: var(--mist); } .dp-balance i { background: var(--c); }
.dp-legend { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem; font-size: 13px; } .dp-legend li, .dp-subs li { display: flex; align-items: center; gap: .45rem; min-width: 0; } .dp-legend i, .dp-subs i { width: 10px; height: 10px; flex-shrink: 0; border-radius: 4px; background: var(--c); } .dp-legend b { margin-inline-start: auto; white-space: nowrap; }
.dp-subs { display: grid; gap: .45rem; font-size: 13.5px; } .dp-subs span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dp-subs b { font-size: 12.5px; color: var(--mut); white-space: nowrap; }
.dp-tip { display: flex; align-items: flex-start; gap: .5rem; padding: .65rem .8rem; border-radius: 13px; background: var(--saff-t); color: var(--saff-d) !important; font-size: 13px; } .dp-tip .li { width: 18px; height: 18px; margin-top: .1rem; }
.sch-card h2 .dp-streak { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .6rem; border-radius: 99px; background: var(--saff-t); color: var(--saff-d); } .dp-streak .li { width: 14px; height: 14px; }
.dp-actions .lx-btn { justify-content: flex-start; } .sch-del2 { color: var(--bad) !important; }

/* Start screen */
.dp-demo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; width: 100%; margin-bottom: .6rem; }
.dp-demo li { display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: .9rem .3rem; border-radius: 20px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-1); animation: sch-in .5s var(--ease) both; }
.dp-demo li:nth-child(even) { translate: 0 14px; }
.dp-demo i { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--c); color: #fff; } .dp-demo .li { width: 25px; height: 25px; } .dp-demo b { font-size: 12.5px; } .dp-demo small { color: var(--faint); font-size: 11.5px; }

/* Wizard, block editor, focus */
.sch-wizard { width: min(560px, calc(100% - 20px)) !important; }
.dp-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; padding: .6rem 1.2rem 0; } .dp-steps i { height: 5px; border-radius: 5px; background: var(--mist); transition: background .3s; } .dp-steps i.on { background: linear-gradient(90deg, #A3134F, #F59A0B); }
.sch-wizard .lx-sheet-foot [data-prev] { flex: 0 0 auto; }
.sch-forecast.warn { background: var(--saff-t); } .sch-forecast.warn b { color: var(--saff-d); }
.dp-toggle { align-items: flex-start; padding: .3rem 0; } .dp-toggle i { margin-top: .2rem; } .dp-toggle span { display: flex; flex-direction: column; } .dp-toggle small { color: var(--mut); font-size: 12px; }
.dp-subjects { display: grid; gap: .65rem; grid-template-columns: minmax(0, 1fr); }
.dp-subjects li { display: grid; gap: .55rem; min-width: 0; padding: .8rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--line-2); border-right: 6px solid var(--c); }
.dp-sub-h { display: flex; align-items: center; gap: .5rem; } .dp-sub-h > i { display: none; }
.dp-sub-h input { flex: 1; min-width: 0; min-height: 46px; padding: 0 .85rem; border-radius: 13px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 16px; }
.dp-exam { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: 13px; color: var(--mut); flex-wrap: wrap; } .dp-exam em { font-style: normal; font-size: 11.5px; opacity: .8; }
.dp-exam input { min-height: 42px; padding: 0 .7rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 15px; }
.dp-addsubs { display: flex; flex-wrap: wrap; gap: .5rem; }
.dp-stepper { display: grid; justify-items: center; gap: .4rem; padding: .8rem; border-radius: 18px; background: var(--paper); border: 1px solid var(--line-2); text-align: center; } .dp-stepper > span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.dp-stepper div { display: flex; align-items: center; gap: .6rem; } .dp-stepper b { min-width: 62px; font-family: var(--f-disp); font-size: 1.7rem; } .dp-stepper b small { font-size: .8rem; color: var(--mut); }
.dp-stepper button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.dp-styles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.dp-styles button { display: grid; gap: .15rem; align-content: start; padding: .7rem .4rem; border-radius: 15px; border: 1.5px solid var(--line); background: var(--card); text-align: center; cursor: pointer; } .dp-styles b { font-family: var(--f-disp); font-size: 1.15rem; } .dp-styles small { color: var(--mut); font-size: 11px; line-height: 1.45; }
.dp-styles [aria-pressed="true"] { border-color: var(--plum); background: var(--plum-t); }
.dp-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.dp-kinds button { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .55rem .2rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); font-size: 11.5px; cursor: pointer; } .dp-kinds .li { color: color-mix(in srgb, var(--c) 85%, var(--ink)); }
.dp-kinds [aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; font-weight: 700; } .dp-kinds [aria-pressed="true"] .li { color: #fff; }
.sch-editor [hidden] { display: none !important; }
.lx-modal.dp-focus { align-items: center; gap: .5rem; width: min(440px, calc(100% - 24px)); text-align: center; color: #fff; background: radial-gradient(120% 80% at 50% 0, #4A1D66, #150C24 70%); }
.dp-focus > .lx-iconbtn { align-self: flex-start; background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; } .dp-focus > p { color: #FFC15E; font-weight: 700; font-size: 13px; } .dp-focus h2 { font-size: 1.6rem; } .dp-focus > small { color: rgba(255, 255, 255, .72); }
.dp-dial { position: relative; width: min(280px, 70vw); aspect-ratio: 1; margin: .6rem 0; } .dp-dial svg { width: 100%; height: 100%; rotate: -90deg; } .dp-dial circle { fill: none; stroke-width: 7; stroke: rgba(255, 255, 255, .12); } .dp-dial circle[data-arc] { stroke: color-mix(in srgb, var(--c) 55%, #FFC15E); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset .5s linear; }
.dp-dial b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-disp); font-size: clamp(2.8rem, 13vw, 4rem); font-variant-numeric: tabular-nums; }
.dp-focus-a { display: flex; gap: .6rem; width: 100%; margin-top: .6rem; } .dp-focus-a .lx-btn { flex: 1; } .dp-focus-a .lx-btn.ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }

/* ---------- Layout ---------- */
.sch-body { padding-block: 1.2rem 3.5rem; }
.sch-next { display: flex; align-items: center; gap: .9rem; width: 100%; margin-bottom: 1rem; padding: .85rem 1.1rem; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: linear-gradient(270deg, color-mix(in srgb, var(--c) 13%, var(--card)), var(--card) 70%); text-align: start; cursor: pointer; }
.sch-next-dot { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 18%, transparent); }
.sch-next.live .sch-next-dot { animation: sch-pulse 1.8s ease-out infinite; }
@keyframes sch-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 55%, transparent); } 100% { box-shadow: 0 0 0 13px transparent; } }
.sch-next > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.sch-next small { color: var(--mut); font-size: 12.5px; } .sch-next b { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sch-next em { font-style: normal; color: var(--mut); font-size: 13px; text-align: end; }
.sch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.sch-main { min-width: 0; }
.sch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .8rem; }
.sch-toolbar .lx-iconbtn:disabled { opacity: .35; cursor: default; }

/* ---------- Week grid ---------- */
.sg-scroll { overflow: auto; border-radius: 24px; border: 1px solid var(--line-2); background: var(--card); box-shadow: var(--sh-1); }
.sg { display: grid; grid-template-columns: 54px repeat(var(--n), minmax(104px, 1fr)); padding: 0 0 14px 8px; }
.sg-corner, .sg-dh { position: sticky; top: 0; z-index: 4; background: var(--card); }
.sg-dh { margin: 0; padding: .8rem 4px .6rem; text-align: center; font-family: var(--f-disp); font-weight: 700; font-size: 1.02rem; }
.sg-dh.today { color: var(--plum); } .sg-dh.today::after { content: ''; display: block; width: 26px; height: 3px; margin: 3px auto -6px; border-radius: 3px; background: var(--plum); }
.sg-axis { position: relative; height: var(--h); margin-top: 16px; }
.sg-axis span { position: absolute; right: 0; left: 0; translate: 0 -50%; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--mut); line-height: 1.1; }
.sg-axis small { display: block; font-weight: 400; font-size: 10.5px; color: var(--faint); }
.sg-day { position: relative; height: var(--h); margin-top: 16px; border-right: 1px solid var(--line-2); background: repeating-linear-gradient(180deg, var(--line-2) 0 1px, transparent 1px var(--hour)); cursor: copy; }
.sg-day.today { background-color: color-mix(in srgb, var(--plum) 4%, transparent); }
.sg-ev { position: absolute; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; overflow: hidden; padding: .4rem .55rem; border: 0; border-right: 5px solid var(--c); border-radius: 12px; background: color-mix(in srgb, var(--c) 14%, var(--card)); color: color-mix(in srgb, var(--c) 55%, var(--ink)); text-align: start; cursor: pointer; transition: box-shadow .2s, filter .2s; animation: sch-in .35s var(--ease) both; }
@keyframes sch-in { from { opacity: 0; transform: scale(.95); } }
.sg-ev:hover { z-index: 3; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--c) 80%, transparent); }
.sg-ev b { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex-shrink: 0; }
.sg-ev span { font-size: 12px; font-weight: 700; opacity: .85; white-space: nowrap; }
.sg-ev small { font-size: 11.5px; opacity: .78; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sg-ev.tiny { justify-content: center; padding-block: 0; } .sg-ev.tiny b { -webkit-line-clamp: 1; font-size: 11.5px; } .sg-ev.tiny span, .sg-ev.tiny small { display: none; }
.sg-ev.study { border: 1.5px dashed var(--c); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 11%, var(--card)) 0 6px, var(--card) 6px 13px); }
.sg-ev.clash { box-shadow: 0 0 0 2px var(--bad); }
.sg-ev.dragging { z-index: 6; pointer-events: none; cursor: grabbing; opacity: .92; box-shadow: 0 18px 30px -10px rgba(28, 16, 48, .5); animation: none; }
.sg-ghost { position: absolute; left: 3px; right: 3px; display: grid; place-items: center; border: 1.5px dashed var(--plum); border-radius: 12px; color: var(--plum); font-size: 12px; font-weight: 700; font-style: normal; pointer-events: none; }
.sg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--plum); z-index: 5; pointer-events: none; }
.sg-now::before { content: ''; position: absolute; right: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--plum); }
.sch-hint { margin-top: .6rem; color: var(--faint); font-size: 12.5px; text-align: center; }

/* ---------- Day view ---------- */
.sd-days { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-bottom: 1rem; }
.sd-days button { flex: 1 0 auto; min-width: 66px; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: .6rem .5rem .5rem; border-radius: 16px; border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 700; font-size: 13.5px; }
.sd-days i { display: flex; gap: 3px; height: 5px; } .sd-days u { width: 5px; height: 5px; border-radius: 50%; background: var(--faint); }
.sd-days [aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); } .sd-days [aria-selected="true"] u { background: var(--lamp, #FFC15E); }
.sd { display: grid; gap: .6rem; }
.sd-ev { display: flex; gap: .7rem; }
.sd-time { display: flex; flex-direction: column; align-items: center; width: 52px; flex-shrink: 0; padding-top: .55rem; line-height: 1.2; }
.sd-time b { font-family: var(--f-disp); font-size: 1.2rem; } .sd-time small { color: var(--faint); font-size: 11.5px; }
.sd-time i { flex: 1; width: 2px; min-height: 12px; margin: 4px 0; border-radius: 2px; background: linear-gradient(var(--c), color-mix(in srgb, var(--c) 15%, transparent)); }
.sd-card { flex: 1; min-width: 0; overflow: hidden; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--c) 24%, var(--line-2)); border-right: 6px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.sd-card > button { display: flex; flex-direction: column; gap: .1rem; width: 100%; padding: .75rem .9rem; border: 0; background: none; text-align: start; cursor: pointer; }
.sd-kind { display: flex; align-items: center; gap: .4rem; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.sd-kind em { font-style: normal; padding: 0 .5rem; border-radius: 99px; background: var(--c); color: #fff; font-size: 11px; } .sd-kind em.bad { background: var(--bad); }
.sd-card b { font-size: 15.5px; line-height: 1.5; overflow-wrap: anywhere; } .sd-card small { color: var(--mut); font-size: 12.5px; }
.sd-links { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 .9rem .7rem; }
.sd-links a { display: inline-flex; align-items: center; gap: .3rem; min-height: 34px; padding: 0 .7rem; border-radius: 10px; background: var(--card); font-size: 12.5px; font-weight: 700; } .sd-links .li { width: 16px; height: 16px; color: color-mix(in srgb, var(--c) 80%, var(--ink)); }
.sd-ev.study .sd-card { border: 1.5px dashed var(--c); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 7%, var(--card)) 0 7px, var(--card) 7px 15px); }
.sd-ev.live .sd-card { box-shadow: 0 0 0 2px var(--c); }
.sd-ev.past { opacity: .6; }
.sd-gap { display: flex; align-items: center; gap: .5rem; padding: .15rem .5rem; padding-inline-start: 62px; color: var(--faint); font-size: 12.5px; }
.sd-gap .li { width: 16px; height: 16px; }
.sd-gap button { display: inline-flex; align-items: center; gap: .2rem; margin-inline-start: auto; min-height: 34px; padding: 0 .65rem; border: 1px dashed var(--line); border-radius: 10px; background: none; color: var(--mut); font-size: 12px; cursor: pointer; }
.sd-add { width: 100%; margin-top: .8rem; }

/* ---------- Side column ---------- */
.sch-side { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.sch-card { display: grid; gap: .7rem; padding: 1.1rem; border-radius: 22px; background: var(--card); border: 1px solid var(--line-2); }
.sch-card h2 { display: flex; align-items: center; gap: .45rem; font-size: 1.15rem; } .sch-card h2 small { margin-inline-start: auto; font: 700 12.5px var(--f-body); color: var(--mut); }
.sch-card p { color: var(--mut); font-size: 13.5px; }
.sch-alert { background: var(--bad-t); border-color: color-mix(in srgb, var(--bad) 35%, transparent); } .sch-alert h2 { color: var(--bad); }
.sch-alert ul { display: grid; gap: .4rem; } .sch-alert button { width: 100%; padding: .5rem .65rem; border: 0; border-radius: 11px; background: var(--card); font-size: 13px; text-align: start; cursor: pointer; } .sch-alert small { display: block; color: var(--mut); }
.sch-plan { color: #fff; border: 0; background: radial-gradient(130% 100% at 0 0, #C21D64, #6B2266 48%, #2C1A4A); } .sch-plan p { color: rgba(255, 255, 255, .85); } .sch-plan .lx-btn { background: #fff; color: #2A1B3D; justify-self: start; }
.sch-courses { display: grid; gap: .45rem; grid-template-columns: minmax(0, 1fr); }
.sch-courses li { min-width: 0; border-radius: 15px; background: color-mix(in srgb, var(--c) 8%, var(--card)); }
.sch-courses button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem; border: 0; background: none; text-align: start; cursor: pointer; }
.sch-courses i { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px; background: var(--c); color: #fff; font-style: normal; font-weight: 800; }
.sch-courses span { display: flex; flex-direction: column; min-width: 0; } .sch-courses b { font-size: 14px; line-height: 1.45; } .sch-courses small { color: var(--mut); font-size: 11.5px; line-height: 1.6; }
.sch-courses a { display: inline-flex; align-items: center; gap: .3rem; margin: 0; margin-inline-start: 3.9rem; padding-bottom: .55rem; font-size: 12px; font-weight: 700; color: color-mix(in srgb, var(--c) 80%, var(--ink)); } .sch-courses a .li { width: 15px; height: 15px; }

/* ---------- Empty state ---------- */
.sch-start { display: grid; justify-items: center; gap: .9rem; max-width: 860px; margin: 1rem auto 0; text-align: center; }
.sch-ghost { position: relative; width: min(560px, 100%); height: 210px; margin-bottom: .6rem; border-radius: 26px; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--sh-2); rotate: -1.2deg; }
.sch-ghost i { position: absolute; right: calc(14px + var(--d) * (100% - 28px) / 5); width: calc((100% - 28px) / 5 - 8px); margin: 0 4px; border-radius: 10px; background: color-mix(in srgb, var(--c) 22%, var(--card)); border-right: 5px solid var(--c); animation: sch-in .5s var(--ease) both; }
.sch-start h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); } .sch-start > p { color: var(--mut); max-width: 50ch; }
.sch-start ol:not(.dp, .dp-demo) { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.sch-start ol:not(.dp-demo) li { display: flex; align-items: center; gap: .5rem; padding: .45rem .5rem .45rem .9rem; padding-inline: .5rem .9rem; border-radius: 99px; background: var(--mist); font-size: 13.5px; }
.sch-start ol:not(.dp-demo) li b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--plum); color: #fff; font-size: 12px; }
.sch-start > div:not(.sch-ghost) { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .4rem; }
.sch-start small { color: var(--mut); } .sch-start small a { color: var(--plum); font-weight: 700; }

/* ---------- Editor & planner ---------- */
.sch-layer .lx-sheet-bar i { width: 44px; }
.sch-layer .lx-sheet-body.lx-form { align-content: start; grid-template-columns: minmax(0, 1fr); }
.sch-editor, .sch-planner { width: min(540px, calc(100% - 20px)) !important; }
.sch-editor .lx-seg button, .sch-planner .lx-seg button { flex: 1; }
.sch-editor .lx-seg { width: 100%; }
.sch-colors { display: flex; flex-wrap: wrap; gap: .45rem; }
.sch-colors label { position: relative; cursor: pointer; }
.sch-colors input { position: absolute; opacity: 0; }
.sch-colors span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--c); color: transparent; transition: scale .15s; }
.sch-colors input:checked + span { color: #fff; box-shadow: 0 0 0 2px var(--card), 0 0 0 4.5px var(--c); }
.sch-colors input:focus-visible + span { outline: 2.5px solid var(--sky); outline-offset: 5px; }
.sch-colors .li-s { stroke-width: 3; }
.sch-editor [data-courseonly] { display: grid; gap: .9rem; }
.sch-h { font-family: var(--f-disp); font-size: 1.2rem; margin-top: .3rem; }
.sch-editor [data-meets] { display: grid; gap: .7rem; grid-template-columns: minmax(0, 1fr); }
.sch-editor .sch-meet { padding: .85rem; gap: .7rem; border-radius: 18px; background: var(--paper); }
.sch-editor .sch-meet .lx-f input { background: var(--card); }
.sch-meet-h { display: flex; align-items: center; gap: .45rem; }
.sch-meet-h select { flex: 1; min-width: 0; min-height: 44px !important; }
.sch-meet-h .lx-iconbtn { width: 44px; }
.sch-presets { display: flex; gap: .3rem; }
.sch-presets button { min-height: 44px; padding: 0 .7rem; border-radius: 12px; border: 1px dashed var(--plum); background: var(--plum-t); color: var(--plum); font-weight: 800; font-size: 13px; white-space: nowrap; cursor: pointer; }
.sch-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .35rem; }
.sch-days button, .sch-durs button { min-height: 42px; padding: 0 .4rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); font-size: 13px; cursor: pointer; }
.sch-days button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); font-weight: 700; }
.sch-durs { display: flex; flex-wrap: wrap; gap: .35rem; } .sch-durs button { flex: 1 0 auto; padding: 0 .75rem; }
.sch-durs button[aria-pressed="true"] { background: var(--plum-t); border-color: var(--plum); color: var(--plum); font-weight: 700; }
.sch-warn { display: flex; gap: .7rem; padding: .8rem 1rem; border-radius: 16px; background: var(--saff-t); color: var(--saff-d); font-size: 13.5px; }
.sch-warn > .li { width: 24px; height: 24px; }
.sch-liblink { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-radius: 16px; background: var(--sky-t); color: var(--sky-d); } .sch-liblink span { flex: 1; display: flex; flex-direction: column; } .sch-liblink small { font-size: 12px; opacity: .8; }
.sch-del { flex: 0 0 62px !important; color: var(--bad) !important; padding: 0 !important; }
.sch-forecast { display: grid; justify-items: center; gap: .1rem; padding: 1.1rem; border-radius: 20px; background: var(--mist); text-align: center; }
.sch-forecast b { font-family: var(--f-disp); font-size: 1.8rem; } .sch-forecast span { color: var(--ink-2); font-size: 14px; } .sch-forecast small { color: var(--saff-d); font-weight: 700; font-size: 12.5px; margin-top: .3rem; }

/* ---------- Export ---------- */
.lx-sheet.sch-export { width: min(1240px, calc(100% - 20px)); }
.sch-export .lx-sheet-bar, .sch-export .lx-sheet-body, .sch-export .lx-sheet-foot { width: 430px; }
.sch-preview { position: absolute; top: 0; bottom: 0; left: 0; right: 430px; display: grid; place-items: center; padding: 1.4rem; overflow: hidden; background: radial-gradient(80% 70% at 50% 40%, #4A3D5C, #241833); }
.sch-preview canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; border-radius: 12px; box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .75); }
.lx-sheet.sch-export.is-cal { width: min(520px, calc(100% - 20px)); } .sch-export.is-cal .lx-sheet-bar, .sch-export.is-cal .lx-sheet-body, .sch-export.is-cal .lx-sheet-foot { width: 100%; }
.sch-opts { display: grid; gap: .9rem; grid-template-columns: minmax(0, 1fr); }
.sch-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.sch-formats button { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .7rem .2rem; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); text-align: center; cursor: pointer; }
.sch-formats .li { width: 24px; height: 24px; margin-bottom: .2rem; color: var(--plum); } .sch-formats b { font-size: 13px; } .sch-formats small { color: var(--mut); font-size: 10.5px; line-height: 1.4; }
.sch-formats [aria-checked="true"] { border-color: var(--plum); background: var(--plum-t); box-shadow: 0 0 0 1px var(--plum); }
.sch-themes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; }
.sch-themes button { display: grid; gap: .35rem; justify-items: center; padding: .4rem .2rem; border-radius: 14px; border: 1.5px solid transparent; background: none; font-size: 12px; cursor: pointer; }
.sch-themes i { width: 100%; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(115deg, transparent 0), linear-gradient(180deg, transparent 38%, var(--c) 38%), linear-gradient(115deg, var(--a), var(--b)); }
.sch-themes [aria-pressed="true"] { border-color: var(--plum); font-weight: 700; }
.sch-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem .8rem; }
.sch-switch { display: flex; align-items: center; gap: .55rem; min-height: 42px; font-size: 13.5px; cursor: pointer; }
.sch-switch input { position: absolute; opacity: 0; }
.sch-switch i { position: relative; flex-shrink: 0; width: 40px; height: 24px; border-radius: 99px; background: var(--mist-2); transition: background .2s; }
.sch-switch i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: translate .2s var(--ease); }
.sch-switch input:checked + i { background: var(--ok); } .sch-switch input:checked + i::after { translate: -16px 0; }
.sch-switch input:focus-visible + i { outline: 2.5px solid var(--sky); outline-offset: 2px; }

/* ---------- Menu & toast ---------- */
.lx-modal.sch-menubox { width: min(560px, calc(100% - 32px)); }
.sch-menu-list { display: grid; gap: .35rem; }
.sch-menu-list button { display: flex; align-items: center; gap: .85rem; padding: .65rem .8rem; border-radius: 15px; border: 1px solid var(--line-2); background: var(--card); text-align: start; cursor: pointer; }
.sch-menu-list button:hover { background: var(--mist); }
.sch-menu-list .li { width: 24px; height: 24px; color: var(--plum); } .sch-menu-list span { display: flex; flex-direction: column; } .sch-menu-list small { color: var(--mut); font-size: 12px; }
.sch-menu-list [data-do="delete"] .li, .sch-menu-list [data-do="clear"] .li { color: var(--bad); }
.lx-modal .lx-form .lx-btn.sm { justify-self: start; }
.sch-undo { margin-inline-start: .4rem; padding: .25rem .7rem; border: 0; border-radius: 9px; background: rgba(255, 255, 255, .18); color: inherit; font-weight: 800; font-size: 13px; cursor: pointer; pointer-events: auto; }
.lib-page .toasts .toast { pointer-events: auto; }
.sch-dock button:not(.lx-dock-find) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 100%; border: 0; background: none; color: var(--faint); font-size: 11px; font-weight: 700; cursor: pointer; }
.sch-dock button:disabled { opacity: .4; }

@media (max-width: 1100px) {
	.sch-layout { grid-template-columns: minmax(0, 1fr); }
	.sch-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 900px) {
	.lx-sheet.sch-export { width: min(560px, calc(100% - 20px)); }
	.sch-export .lx-sheet-bar, .sch-export .lx-sheet-body, .sch-export .lx-sheet-foot { width: 100%; }
	.sch-preview { position: static; flex-shrink: 0; height: 34vh; padding: .8rem; }
	.sch-export .sch-preview { order: 0; }
	.sch-export .lx-grab { order: -2; } .sch-export .lx-sheet-bar { order: -1; } .sch-export .lx-sheet-body, .sch-export .lx-sheet-foot { order: 1; }
	.sch-stats { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
	.sch .wrap { width: calc(100% - 24px); }
	.sch-head { padding: 1.1rem 0 1.2rem; }
	.sch-actions { width: 100%; flex-wrap: nowrap; }
	.sch-actions .lx-btn { flex: 1; padding: 0 .6rem; }
	.sch-actions .sch-menu { flex: 0 0 48px; } .sch-actions .sch-menu span { display: none; }
	.sch-stats { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; margin-inline: -12px; padding-inline: 12px; }
	.sch-stats div { flex: 0 0 auto; padding: .5rem .8rem; gap: .5rem; border-radius: 14px; } .sch-stats dd { font-size: 1.45rem; } .sch-stats dt { font-size: 11.5px; max-width: 120px; }
	.sch-next { padding: .75rem .85rem; } .sch-next em { display: none; }
	.sch-side { grid-template-columns: minmax(0, 1fr); margin-top: .4rem; }
	.sg { grid-template-columns: 40px repeat(var(--n), minmax(58px, 1fr)); padding-left: 4px; }
	.sg-dh { font-size: .8rem; padding-inline: 1px; }
	.sg-ev { padding: .25rem .25rem; border-right-width: 3px; border-radius: 9px; }
	.sg-ev b { font-size: 10.5px; -webkit-line-clamp: 3; max-width: 100%; } .sg-ev span { font-size: 9.5px; white-space: normal; line-height: 1.35; } .sg-ev small { display: none; }
	.sch-mouse { display: none; }
	.lx-sheet.sch-editor, .lx-sheet.sch-planner, .lx-sheet.sch-export, .lx-sheet.sch-export.is-cal, .lx-sheet.sch-wizard { width: 100% !important; }
	.sch-switcher { display: grid; width: 100%; margin-bottom: .9rem; border-radius: 19px; } .sch-switcher button { gap: .5rem; padding: .5rem .65rem; border-radius: 15px; } .sch-switcher .li { width: 22px; height: 22px; } .sch-switcher b { font-size: 13.5px; } .sch-switcher small { font-size: 10.5px; }
	.sd-days.sch-week { margin-inline: -12px; padding-inline: 12px; } .sd-days.sch-week button { min-width: 82px; flex: 0 0 auto; }
	.dp-now { flex-wrap: wrap; gap: .9rem; padding: 1rem; border-radius: 22px; } .dp-ring { width: 74px; height: 74px; } .dp-ring b { font-size: 1.1rem; } .dp-now-t { flex-basis: calc(100% - 100px); } .dp-now-t b { font-size: 1.25rem; }
	.dp-now-a { width: 100%; } .dp-now-a:empty { display: none; } .dp-now-a .lx-btn { flex: 1; }
	.dp-item { grid-template-columns: 40px 36px minmax(0, 1fr); column-gap: .4rem; } .dp::before { right: 63px; }
	.dp-node { width: 36px; height: 36px; border-radius: 12px; } .dp-node .li { width: 19px; height: 19px; }
	.dp-item.small .dp-node { width: 26px; height: 26px; margin-inline: 5px; border-radius: 9px; } .dp-item.small .dp-node .li { width: 15px; height: 15px; }
	.dp-main { padding: .35rem .45rem; } .dp-main b { font-size: 14px; } .dp-main small { font-size: 11.5px; }
	.dp-play, .dp-check { width: 38px; height: 38px; border-radius: 12px; } .dp-card { gap: .3rem; padding-inline-end: .4rem; }
	.dp-gap { padding-inline-start: 84px; }
	.dp-demo { grid-template-columns: repeat(4, minmax(0, 1fr)); } .dp-demo li:nth-child(even) { translate: none; } .dp-demo li:last-child { grid-column: span 2; }
	.sch-export .sch-preview { height: 30vh; }
	.sch-start > div:not(.sch-ghost) { width: 100%; flex-direction: column; }
	.sch-ghost { height: 170px; }
}
@media (hover: none) { .sch-mouse { display: none; } }
@media (prefers-reduced-motion: reduce) { .sch *, .sch-next-dot { animation: none !important; } }
@media print { .sch-switcher, .sch-actions, .sch-tabs, .sch-toolbar, .sch-side, .sch-next, .sch-hint { display: none !important; } }
