@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root { color-scheme: light; font-family: 'DM Sans', 'Noto Sans SC', sans-serif; background: #f6f7fb; color: #1d2130; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 85% 0%, #e9e5ff 0, transparent 28%), #f6f7fb; }
button, input, select, textarea { font: inherit; }
button { border: 0; cursor: pointer; }
.app-shell { width: min(100%, 720px); margin: 0 auto; padding: 18px 20px 84px; }
.topbar, .section-heading, .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow, .section-kicker { margin: 0 0 7px; color: #8379c7; font-size: 11px; letter-spacing: .16em; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 25px; letter-spacing: -.04em; }
h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.03em; }
h3 { margin: 0; font-size: 20px; }
.muted { color: #777d91; font-size: 13px; margin-bottom: 9px; }
.icon-button, .close-button { width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.78); color: #5d5a85; font-size: 20px; box-shadow: 0 8px 22px rgba(55,49,100,.07); }
.compact-date { margin: 7px 0 14px; color: #777d91; font-size: 14px; font-weight: 600; }
.date-nav { display: flex; align-items: center; justify-content: space-between; margin: 5px 0 12px; }
.date-nav-button { width: 32px; height: 32px; border-radius: 10px; color: #615ab9; background: #ebe9ff; font-size: 24px; line-height: 1; }
.hero-card { min-height: 150px; margin: 28px 0 22px; padding: 24px; border-radius: 27px; color: #fff; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(125deg, #625bd4, #9c8de9); box-shadow: 0 16px 30px rgba(98,91,212,.24); overflow: hidden; }
.hero-card .muted { color: #e6e3ff; }
.hero-orb { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; font-size: 31px; background: rgba(255,255,255,.16); transform: rotate(15deg); }
.tabs { display: flex; gap: 6px; padding: 3px; margin-bottom: 12px; border-radius: 12px; background: #e9eaf3; }
.tab { flex: 1; padding: 11px 10px; border-radius: 12px; color: #7b7f91; background: transparent; font-weight: 600; }
.tab.active { color: #3f3b85; background: #fff; box-shadow: 0 4px 12px rgba(42,38,89,.08); }
.section-heading { margin-bottom: 16px; }
.count-pill { padding: 7px 10px; border-radius: 10px; color: #615ab9; background: #ebe9ff; font-size: 12px; font-weight: 600; }
.schedule-list, .week-list { display: grid; gap: 11px; }
.assignment-strip { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; margin: -1px 0 8px; }
.assignment-label { width: 100%; margin: 0; color: #8379c7; font-size: 11px; letter-spacing: .16em; font-weight: 700; }
.assignment-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 9px; border: 1px solid #f1dfb9; border-radius: 10px; color: #806022; background: #fff9ea; font-size: 11px; font-weight: 600; }
.assignment-chip::before { content: '✓'; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; color: #fff; background: #e6ae45; font-size: 10px; }
.assignment-empty { color: #9a9cad; font-size: 12px; }
.timeline { display: grid; grid-auto-rows: 48px; align-items: start; gap: 4px; }
.timeline-block { position: relative; align-self: start; display: grid; grid-template-columns: 54px 1fr; height: 48px !important; min-height: 48px; max-height: 48px; border: 1px solid #e3e4ee; border-radius: 9px; overflow: visible; background: rgba(255,255,255,.66); }
.timeline-block.empty { height: 48px !important; min-height: 48px; max-height: 48px; padding: 0; border-style: solid; }
.timeline-block > * { min-height: 0; }
.timeline-time { display: flex; align-items: center; justify-content: center; padding: 3px 2px; color: #85899a; background: #f2f3f8; font-size: 9px; line-height: 1.05; font-weight: 700; }
.timeline-content { position: relative; z-index: 20; min-width: 0; padding: 0; overflow: visible; }
.timeline-block.course .timeline-content, .timeline-block.work .timeline-content { background: transparent; }
.timeline-block.empty .timeline-content { color: #afb2bf; background: rgba(255,255,255,.45); }
.timeline-block.empty .timeline-content { display: grid; place-items: center; padding: 4px; }
.timeline-track { position: absolute; inset: 0; }
.timeline-segment { position: absolute; z-index: 30; left: 0; right: 0; min-height: 40px; overflow: hidden; padding: 6px 7px 4px; border-top: 4px solid currentColor; border-radius: 5px; box-shadow: 0 2px 5px rgba(72,47,47,.08); }
.timeline-segment.course { color: #922f35; background: #fff0f0; }
.timeline-segment.work { color: #28734c; background: #edf9f1; }
.timeline-segment strong { display: -webkit-box; overflow: hidden; font-size: 11px; line-height: 1.2; text-overflow: ellipsis; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.timeline-segment small { display: none; }
.timeline-empty-label { font-size: 12px; }
.plan-card { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 15px; padding: 16px; border: 1px solid rgba(224,225,237,.8); border-radius: 19px; background: rgba(255,255,255,.82); box-shadow: 0 8px 22px rgba(53,57,89,.05); }
.time { color: #635bc0; font-size: 13px; font-weight: 700; }
.plan-title { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.plan-note { margin: 0; color: #83889a; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-dot { width: 10px; height: 10px; margin: 0 auto; border-radius: 50%; background: #f29b75; box-shadow: 0 0 0 5px #fff1eb; }
.type-dot.work { background: #6ba4d9; box-shadow: 0 0 0 5px #eaf4ff; }
.plan-actions { display: flex; gap: 3px; }
.small-button { padding: 7px; color: #9a9cad; background: transparent; font-size: 12px; }
.empty { padding: 30px 18px; text-align: center; color: #9296a7; border: 1px dashed #d4d6e3; border-radius: 18px; }
.week-day { margin-bottom: 4px; color: #72778d; font-size: 13px; font-weight: 700; }
.week-group { padding: 16px; border-radius: 19px; background: rgba(255,255,255,.7); }
.week-board { display: grid; grid-template-columns: repeat(7, minmax(84px, 1fr)); gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.week-day-column { min-width: 84px; padding: 10px 6px 8px; border: 1px solid #e1e2ec; border-radius: 14px; color: #555a70; background: rgba(255,255,255,.72); text-align: center; }
.week-day-column.selected { border-color: #776fe0; box-shadow: 0 0 0 2px #eceaff; }
.week-column-label { display: block; color: #84899a; font-size: 11px; }
.week-day-column strong { display: block; margin: 4px 0 9px; color: #2a2d3d; font-size: 18px; }
.mini-blocks { display: grid; gap: 4px; text-align: left; }
.mini-time-block { display: grid; gap: 1px; padding: 4px 5px; border-radius: 5px; background: #edb7ba; color: #7f2930; }
.mini-time-block.work { background: #a8dbba; color: #24623f; }
.mini-time-block small, .mini-time-block b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-time-block small { font-size: 8px; opacity: .8; }
.mini-time-block b { font-size: 9px; }
.mini-empty { color: #a5a8b4; font-size: 10px; text-align: center; }
.mini-assignment { display: block; margin-top: 8px; color: #b17d26; font-size: 10px; }
.day-detail { margin-top: 17px; }
.day-detail-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.day-detail-heading h3 { font-size: 17px; }
.month-nav { display: flex; gap: 6px; }
.month-nav-button { width: 34px; height: 34px; border-radius: 10px; color: #615ab9; background: #ebe9ff; font-size: 22px; line-height: 1; }
.month-weekdays, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.month-weekdays { margin-bottom: 5px; color: #85899a; font-size: 11px; font-weight: 700; text-align: center; }
.month-cell { min-height: 78px; padding: 7px; border: 1px solid #e1e2ec; border-radius: 11px; background: rgba(255,255,255,.75); text-align: left; }
button.month-cell { color: #333747; }
.month-cell.selected { border-color: #776fe0; box-shadow: 0 0 0 2px #eceaff; }
.muted-cell { border-color: transparent; background: transparent; }
.month-date { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; }
.month-event { display: block; overflow: hidden; margin-top: 3px; padding: 3px 4px; border-radius: 5px; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.month-event small { font-size: 8px; opacity: .75; }
.month-event.course { color: #922f35; background: #fff0f0; }
.month-event.work { color: #28734c; background: #edf9f1; }
.month-more { display: block; margin-top: 4px; color: #8d90a0; font-size: 9px; }
.fixed-course-card { margin-bottom: 22px; padding: 18px; border: 1px solid rgba(224,225,237,.8); border-radius: 21px; background: rgba(255,255,255,.82); box-shadow: 0 8px 22px rgba(53,57,89,.05); }
.fixed-course-grid { display: grid; grid-template-columns: repeat(5, minmax(118px, 1fr)); gap: 9px; overflow-x: auto; }
.fixed-day { min-width: 118px; padding: 10px; border-radius: 14px; background: #f7f7fc; }
.fixed-class { display: grid; gap: 3px; margin-top: 8px; padding: 10px; border-radius: 12px; color: #443e95; background: #e9e7ff; }
.fixed-class:nth-child(3n) { color: #8d4d14; background: #fff0dc; }
.fixed-class:nth-child(4n) { color: #8a2525; background: #ffe7e7; }
.fixed-time { font-size: 11px; font-weight: 700; opacity: .75; }
.fixed-class strong { font-size: 12px; line-height: 1.25; }
.fixed-class small { font-size: 10px; opacity: .8; }
.fixed-empty { padding: 12px 4px; color: #a1a4b2; font-size: 11px; }
.synced-heading { margin-top: 4px; }
.filter-row { display: flex; gap: 8px; margin: -2px 0 16px; }
.filter { padding: 8px 14px; border-radius: 10px; color: #7e8291; background: #e9eaf3; font-size: 12px; font-weight: 600; }
.filter.active { color: #fff; background: #7068d2; }
.add-button { position: fixed; right: max(22px, calc((100vw - 720px) / 2 + 20px)); bottom: max(24px, env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 20px; color: #fff; background: #625bd4; font-size: 30px; line-height: 1; box-shadow: 0 12px 25px rgba(98,91,212,.35); }
.modal-backdrop { position: fixed; inset: 0; z-index: 10; padding: 20px; display: grid; place-items: end center; background: rgba(35,35,55,.32); backdrop-filter: blur(7px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(100%, 620px); max-height: calc(100vh - 40px); overflow: auto; padding: 24px; border-radius: 26px; background: #fff; box-shadow: 0 20px 70px rgba(30,28,70,.2); }
.modal-header { margin-bottom: 22px; align-items: flex-start; }
form { display: grid; gap: 15px; }
label { display: grid; gap: 7px; color: #64697d; font-size: 12px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #e1e2ec; border-radius: 13px; padding: 12px; outline: none; color: #26293a; background: #fafaff; }
input:focus, select:focus, textarea:focus { border-color: #8b83e1; box-shadow: 0 0 0 3px #eeecff; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.primary-button { margin-top: 4px; padding: 14px; border-radius: 14px; color: #fff; background: #625bd4; font-weight: 700; }
.secondary-button { padding: 13px; border: 1px solid #deddf2; border-radius: 14px; color: #625bd4; background: #f8f7ff; font-weight: 700; }
.settings-hint, .sync-status { margin: -4px 0 0; color: #878b9e; font-size: 12px; line-height: 1.5; }
.sync-status { color: #625bd4; }
.view { display: none; }
.active-view { display: block; }
@media (max-width: 450px) { .app-shell { padding-top: 14px; } .hero-card { min-height: 140px; } .plan-card { grid-template-columns: 52px 1fr auto; gap: 10px; padding: 14px; } .plan-note { max-width: 170px; } .fixed-course-grid { grid-template-columns: repeat(5, 118px); } .week-board { grid-template-columns: repeat(7, 74px); } .week-day-column { min-width: 74px; } .month-cell { min-height: 62px; padding: 5px; } }
