:root {
  color-scheme: light dark;
  --sky: #269de8;
  --sky-dark: #1479bc;
  --sky-soft: #e8f6ff;
  --orange: #ff8a24;
  --ink: #17324a;
  --muted: #6a8296;
  --line: #dceaf3;
  --paper: #ffffff;
  --wash: #f6fbff;
  --danger: #d94d55;
  --shadow: 0 16px 45px rgba(38, 100, 145, .1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--wash);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body { margin: 0; min-height: 100vh; max-width: 100%; overflow-x: hidden; background: radial-gradient(circle at 90% 0, #e8f7ff 0, transparent 34rem), var(--wash); }
.native-app body { min-height: 100dvh; }
.native-app .site-header { top: 0; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 30; height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(24px, calc((100vw - 1120px)/2)); background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(220,234,243,.8); backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { display: flex; align-items: baseline; gap: 6px; }
.brand strong { font-size: 20px; letter-spacing: .2px; }
.brand small { color: var(--sky-dark); font-size: 15px; font-weight: 700; }
nav { display: flex; align-items: center; gap: 8px; }
nav a, .space-button { padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 650; }
nav a:hover { background: var(--sky-soft); color: var(--sky-dark); }
.space-button, .primary { border: 0; background: var(--sky); color: white; cursor: pointer; box-shadow: 0 8px 20px rgba(38,157,232,.18); }
.space-button:has(.account-avatar) { display: grid; place-items: center; width: 46px; height: 46px; padding: 3px; border-radius: 50%; }
.account-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.92); background: white; }
.space-button:hover, .primary:hover { background: var(--sky-dark); transform: translateY(-1px); }
main { width: min(1120px, calc(100% - 40px)); min-height: calc(100vh - 180px); margin: 0 auto; padding: 48px 0 72px; }
main:focus { outline: none; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; margin-bottom: 42px; }
.eyebrow { color: var(--sky-dark); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
h1 { margin: 10px 0 12px; font-size: clamp(34px, 5vw, 58px); letter-spacing: -.04em; line-height: 1.08; }
.lead { color: var(--muted); line-height: 1.8; font-size: 17px; max-width: 660px; }
.hero-logo { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 18px 25px rgba(23,121,188,.14)); }
.owner-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin: 0 0 42px; padding: 26px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(135deg,#fff,#eef9ff); box-shadow: var(--shadow); }
.owner-avatar { width: 92px; height: 92px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: 0 10px 25px rgba(38,100,145,.16); background: var(--sky-soft); }
.owner-avatar.large { width: 132px; height: 132px; }
.owner-main h2 { margin: 5px 0 8px; font-size: 25px; }
.owner-main p { margin: 6px 0; color: var(--muted); line-height: 1.7; white-space: pre-line; }
.owner-signature { color: var(--sky-dark) !important; font-weight: 750; }
.owner-meta { display: flex; flex-wrap: wrap; gap: 9px 18px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.owner-meta a { color: var(--sky-dark); }
.profile-editor { display: grid; grid-template-columns: 170px 1fr; gap: 28px; align-items: start; }
.profile-preview { display: grid; justify-items: center; gap: 14px; }
.toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 26px 0 18px; }
.home-feed { display: grid; grid-template-columns: minmax(0,1fr) 286px; gap: 20px; align-items: start; }
.search { width: min(440px, 100%); position: relative; }
.search input, input, textarea, select { width: 100%; border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; background: white; color: var(--ink); outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(38,157,232,.12); }
input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 0; min-height: 46px; color-scheme: light; }
input::-webkit-date-and-time-value { text-align: left; }
.time-select { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 8px; }
.time-select span { color: var(--muted); font-weight: 800; }
.time-select select { min-width: 0; min-height: 46px; text-align: center; }
.section-title { font-size: 24px; margin: 0; }
.article-list { display: grid; gap: 16px; }
.article-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 28px rgba(38,100,145,.05); transition: .2s ease; }
.article-card:hover { transform: translateY(-2px); border-color: #b9dced; box-shadow: var(--shadow); }
.article-card h2 { margin: 6px 0 10px; font-size: 22px; }
.article-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.compact-list .article-card { padding: 18px 20px; border-radius: 16px; gap: 16px; }
.compact-list .article-card h2 { margin: 4px 0 7px; font-size: 19px; }
.compact-list .article-card p { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; }
.compact-list .tag { padding: 3px 7px; font-size: 11px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 18px 0 6px; color: var(--muted); font-size: 13px; }
.pager button:disabled { opacity: .42; cursor: not-allowed; }
.activity-card { position: sticky; top: 96px; margin-top: 73px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 28px rgba(38,100,145,.06); }
.activity-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 15px; }
.activity-head h3 { margin: 0 0 4px; font-size: 17px; }
.activity-head p { margin: 0; color: var(--muted); font-size: 12px; }
.activity-total { color: var(--sky-dark); font-size: 12px; font-weight: 750; }
.heat-scroll { overflow-x: auto; padding-bottom: 3px; }
.heat-grid { display: grid; grid-template-rows: repeat(7,10px); grid-auto-flow: column; grid-auto-columns: 10px; gap: 3px; width: max-content; }
.heat-cell { display: block; width: 10px; height: 10px; border-radius: 2px; background: #edf4f8; }
.heat-cell.level-1 { background: #b9e5ff; }
.heat-cell.level-2 { background: #59bdf3; }
.heat-cell.level-3 { background: #1479bc; }
.heat-months { display: grid; grid-template-columns: repeat(4,1fr); min-width: 231px; margin-top: 8px; color: var(--muted); font-size: 11px; text-align: center; }
.heat-legend { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.meta, .tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.tag { background: var(--sky-soft); color: var(--sky-dark); padding: 5px 9px; border-radius: 999px; font-weight: 700; }
.pin { color: var(--orange); font-weight: 800; }
.empty { padding: 52px 24px; text-align: center; color: var(--muted); background: white; border: 1px dashed #bddaea; border-radius: 20px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 26px; }
.login-shell { max-width: 480px; margin: 40px auto; }
.login-shell .logo { display: block; width: 86px; margin: 0 auto 14px; }
.login-shell h1 { text-align: center; font-size: 30px; }
.login-shell .lead { text-align: center; font-size: 14px; margin: 0 auto 24px; }
.field { display: grid; gap: 7px; margin: 14px 0; }
.field label { font-weight: 700; font-size: 14px; }
.button-row { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
button { transition: .18s ease; }
.primary, .secondary, .danger, .ghost { padding: 11px 16px; border-radius: 12px; font-weight: 750; cursor: pointer; }
.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.secondary:hover { border-color: var(--sky); color: var(--sky-dark); }
.danger { border: 1px solid #ffd4d7; background: #fff3f4; color: var(--danger); }
.ghost { border: 0; background: transparent; color: var(--muted); }
.wide { width: 100%; }
.check { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: 14px; }
.check input { width: auto; }
.dashboard { display: grid; grid-template-columns: 232px minmax(0,1fr); gap: 26px; align-items: start; }
#dashboardContent { min-width: 0; }
.side { position: sticky; top: 92px; align-self: start; padding: 14px; }
.side-links { display: grid; gap: 6px; }
.side button { width: 100%; text-align: left; padding: 12px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.side button.active, .side button:hover { background: var(--sky-soft); color: var(--sky-dark); }
.side .logout { margin-top: 12px; color: var(--danger); }
.dashboard-menu-toggle { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 30px; margin: 0 0 6px; }
.page-head p { color: var(--muted); margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 18px; }
.stat { padding: 20px; border-radius: 18px; background: linear-gradient(145deg,#fff,#f4fbff); border: 1px solid var(--line); }
.stat strong { display: block; margin-top: 8px; font-size: 25px; }
.content-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.list { display: grid; gap: 10px; }
.list-item { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.list-item h3 { margin: 0 0 6px; font-size: 16px; }
.list-item p { margin: 0; color: var(--muted); font-size: 14px; }
.task-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.task-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.course { border-left: 5px solid var(--sky); }
.week-grid { display: grid; grid-template-columns: repeat(7,minmax(130px,1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.day-column { min-height: 280px; background: #f8fcff; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.day-column h3 { margin: 4px 2px 10px; font-size: 14px; }
.course-chip { color: white; border-radius: 12px; padding: 10px; margin: 7px 0; font-size: 13px; }
.course-chip { background: var(--course-color,var(--sky)); }
.day-empty { margin: 24px 0; color: var(--muted); text-align: center; font-size: 12px; }
.calendar-mobile-hint { display: none; color: var(--muted); font-size: 12px; margin: -6px 0 10px; }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: white; padding: 9px 13px; border-radius: 10px; cursor: pointer; }
.tabs button.active { background: var(--sky); color: white; border-color: var(--sky); }
.month-title { margin: 4px 0 14px; }
.month-head, .month-grid { display: grid; grid-template-columns: repeat(7,minmax(92px,1fr)); }
.month-head span { padding: 8px; text-align: center; color: var(--muted); font-size: 13px; font-weight: 750; }
.month-cell { min-height: 116px; padding: 9px; border: 1px solid var(--line); background: white; }
.month-cell strong { display: block; margin-bottom: 6px; }
.month-cell:nth-child(7n+1) { border-radius: 12px 0 0 12px; }
.month-cell:nth-child(7n) { border-radius: 0 12px 12px 0; }
.muted-cell { background: #f3f8fb; }
.today-cell { background: var(--sky-soft); box-shadow: inset 0 0 0 2px var(--sky); }
.month-event { display: block; margin: 4px 0; padding: 3px 5px; border-left: 3px solid var(--sky); border-radius: 4px; background: #f5fbff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 11px; }
.month-dots { display: none; justify-content: center; gap: 2px; margin-top: 4px; }
.month-dots i { width: 5px; height: 5px; border-radius: 50%; }
.month-dots .task-dot { background: var(--orange); }
.task-event { border-color: var(--orange); }
.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.form-grid .full { grid-column: 1/-1; }
.date-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.date-presets button { min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--sky-soft); color: var(--sky-dark); font-weight: 700; cursor: pointer; }
.date-presets button:active { background: var(--sky); color: white; }
.schedule-modal { width: min(900px,100%); }
.schedule-manager { display: grid; grid-template-columns: repeat(2,minmax(360px,1fr)); gap: 18px; }
.schedule-section { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #f9fcff; }
.section-bar { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 12px; margin-bottom: 14px; }
.section-bar > div { min-width: 0; }
.section-bar h3 { margin: 0 0 4px; }
.section-bar p { margin: 0; color: var(--muted); font-size: 12px; }
.section-bar .primary { width: auto; min-width: 88px; white-space: nowrap; text-align: center; }
.manager-list { display: grid; gap: 9px; max-height: 430px; overflow-y: auto; }
.manager-card { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.manager-card > :first-child { min-width: 0; flex: 1; }
.manager-card.active-card { border-color: #8bcff4; background: var(--sky-soft); }
.manager-title { font-weight: 800; }
.manager-title { overflow-wrap: anywhere; line-height: 1.25; }
.manager-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.status-pill { margin-left: 5px; padding: 3px 7px; border-radius: 999px; background: var(--sky); color: white; font-size: 10px; }
.mini-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.manager-card .mini-actions { display: flex; justify-content: flex-end; width: 100%; }
.manager-card .mini-actions button { white-space: nowrap; }
.mini-actions button { min-height: 34px; padding: 7px 9px; font-size: 11px; }
.template-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.template-row button { min-height: 36px; padding: 7px 10px; font-size: 11px; }
.compact-empty { padding: 25px 12px; }
.manager-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.manager-summary > div { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.manager-summary span { display: block; color: var(--muted); font-size: 12px; }
.manager-summary strong { display: block; margin-top: 6px; font-size: 20px; }
.course-admin-list { display: grid; gap: 10px; }
.course-admin-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-left: 5px solid var(--sky); border-radius: 14px; }
.course-admin-card h3 { margin: 0 0 7px; }
.course-admin-card p { margin: 3px 0; color: var(--muted); font-size: 13px; }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.editor { min-height: 420px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.article-editor-modal { width: min(1080px,100%); }
.editor-help { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.editor-help span { color: var(--muted); font-size: 13px; }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.editor-preview { min-height: 420px; max-height: 560px; overflow: auto; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdff; }
.editor-preview > :first-child { margin-top: 0; }
.article { max-width: 780px; margin: 0 auto; }
.article h1 { font-size: 42px; }
.article-body { font-size: 17px; line-height: 1.9; color: #29445a; }
.article-body p { overflow-wrap: anywhere; }
.article-body img { display: block; max-width: 100%; height: auto; margin: 22px auto; border-radius: 16px; box-shadow: 0 10px 28px rgba(23,50,74,.1); }
.article-body pre { overflow: auto; background: #14293a; color: #e9f7ff; padding: 18px; border-radius: 14px; }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%,24px); padding: 12px 18px; border-radius: 12px; background: #17324a; color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(17,42,60,.38); backdrop-filter: blur(5px); }
.modal-card { width: min(620px,100%); max-height: 88vh; overflow: auto; background: white; border-radius: 22px; padding: 24px; box-shadow: 0 24px 70px rgba(15,52,76,.25); }
.hidden { display: none !important; }
footer { min-height: 92px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px; padding: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: white; }
.beian-link { display: inline-flex; align-items: center; gap: 6px; }
.beian-link img { width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
@media (prefers-color-scheme: dark) {
  :root { color-scheme:dark; --ink:#f4f9fc; --muted:#c1d0da; --line:#496474; --paper:#172832; --wash:#0d171e; --sky:#42b5f5; --sky-dark:#71c9fa; --sky-soft:#193e54; --danger:#ff8d96; --shadow:0 16px 45px rgba(0,0,0,.3); }
  body { background: radial-gradient(circle at 90% 0,#142f40 0,transparent 34rem),var(--wash); }
  .site-header { background:rgba(15,25,32,.9); border-color:var(--line); }
  .modal { background:rgba(2,10,15,.72); }
  .modal-card { background:#172832; color:var(--ink); border:1px solid #496474; box-shadow:0 24px 80px rgba(0,0,0,.58); }
  .panel,.article-card,.activity-card,.manager-card,.manager-summary>div,.month-cell,.list-item,.secondary,.search input,input,textarea,select { background:#172832; color:var(--ink); border-color:var(--line); }
  input[type="date"],input[type="time"],input[type="datetime-local"] { color-scheme:dark; }
  select option { background:#172832; color:var(--ink); }
  .field label,.modal-card h1,.modal-card h2,.modal-card h3 { color:var(--ink); }
  .ghost { color:#d3e2ea; }
  .ghost:hover { background:#203946; color:#fff; }
  input::placeholder,textarea::placeholder { color:#91a8b7; opacity:1; }
  .owner-card,.stat { background:linear-gradient(145deg,#172832,#1b3341); border-color:var(--line); }
  .day-column,.schedule-section,.editor-preview { background:#13232d; border-color:var(--line); }
  .month-event { background:#1c3340; color:#edf7fc; }
  .muted-cell { background:#101a21; }
  .heat-cell { background:#2a3b46; }
  .danger { background:#42262d; border-color:#85505a; color:#ffb5bb; }
  footer { background:#111e27; }
  .editor-actions { background:#14222c !important; }
  .account-avatar { background:#14222c; }
  .lead,.meta,.page-head p,.list-item p,.manager-card p,.section-bar p,.course-admin-card p,.owner-main p,.field .hint { color:var(--muted); }
  .secondary:hover { background:#1e3a49; color:#a6ddfb; }
  .tag { background:#1c4961; color:#bce7ff; }
  .tabs button { background:#172832; color:var(--ink); border-color:var(--line); }
  .tabs button.active { background:var(--sky); color:#07151d; }
  .date-presets button { background:#193e54; color:#c9ecff; border-color:#46718a; }
  .side-links button { background:#172832; color:var(--ink); border-color:var(--line); }
  .side button.active,.side button:hover { background:#1c4961; color:#d9f2ff; }
  .editor-actions { background:#172832; }
}
@media (max-width: 1020px) and (min-width: 761px) {
  main { width: min(100% - 32px,1120px); }
  .dashboard { grid-template-columns: 190px minmax(0,1fr); gap: 18px; }
  .side { padding: 10px; }
  .home-feed { grid-template-columns: minmax(0,1fr) 250px; }
  .schedule-manager { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .schedule-manager { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header { height: 64px; padding: 0 16px; }
  .brand img { width: 38px; height: 38px; }
  nav > a { display: none; }
  nav { gap: 4px; }
  .space-button { padding: 9px 12px; }
  .space-button:has(.account-avatar) { width: 42px; height: 42px; padding: 2px; }
  .account-avatar { width: 37px; height: 37px; }
  main { width: min(100% - 20px,1120px); padding: 22px 0 48px; }
  .hero { grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 24px; }
  .hero-logo { width: 92px; height: 92px; order: -1; }
  .hero h1 { font-size: 34px; }
  .hero .lead { grid-column: 1/-1; font-size: 15px; }
  .owner-card { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 22px 18px; }
  .owner-meta { justify-content: center; }
  .profile-editor { grid-template-columns: 1fr; }
  .toolbar, .page-head { align-items: stretch; flex-direction: column; }
  .home-feed { grid-template-columns: 1fr; gap: 12px; }
  .article-card { grid-template-columns: 1fr; padding: 19px; }
  .compact-list .article-card { padding: 16px; }
  .activity-card { position: static; order: -1; margin-top: 0; padding: 16px; }
  #activityMap { order: -1; }
  .dashboard { display: block; }
  .side { position: sticky; top: 64px; z-index: 24; margin: -22px -10px 14px; padding: 8px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: 0 8px 20px rgba(38,100,145,.08); }
  .dashboard-menu-toggle { display: flex !important; justify-content: space-between; align-items: center; min-height: 46px; background: var(--sky-soft) !important; color: var(--sky-dark) !important; }
  .side-links { display: none; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding-top: 8px; }
  .side.open .side-links { display: grid; }
  .side-links button { min-height: 44px; text-align: center; padding: 9px 7px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font-size: 13px; }
  .side .logout { grid-column: 1/-1; margin: 2px 0 0; }
  #dashboardContent { width: 100%; min-width: 0; overflow: hidden; }
  .stat-grid, .content-grid, .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .date-field { width: 100%; min-width: 0; }
  .date-field input { display: block; width: 100%; max-width: 100%; font-size: 16px; }
  .time-select select { min-height: 48px; padding: 10px 8px; font-size: 16px; }
  .date-presets { grid-column: 1; display: grid; grid-template-columns: repeat(2,1fr); }
  .date-presets button { width: 100%; min-height: 44px; }
  .schedule-manager { grid-template-columns: 1fr; }
  .schedule-section { padding: 13px; }
  .manager-list { max-height: none; }
  .manager-card { align-items: stretch; }
  .manager-card .mini-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-content: stretch; }
  .mini-actions { justify-content: stretch; width: 100%; }
  .mini-actions button { flex: 1; min-height: 42px; }
  .section-bar .primary { flex: 0 0 auto; }
  .manager-summary { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .manager-summary > div { padding: 11px 8px; text-align: center; }
  .manager-summary strong { font-size: 16px; overflow-wrap: anywhere; }
  .course-admin-card { align-items: stretch; flex-direction: column; }
  .article h1 { font-size: 34px; }
  .article-body { font-size: 16px; line-height: 1.82; }
  .article-body img { width: auto; max-height: 70vh; margin: 18px auto; border-radius: 12px; }
  .panel { padding: 18px; border-radius: 17px; }
  .modal { padding: 8px; align-items: end; }
  .modal-card { max-height: 94vh; padding: 18px 14px; border-radius: 20px 20px 0 0; }
  .editor-help { align-items: flex-start; flex-direction: column; }
  .editor-split { grid-template-columns: 1fr; }
  .editor { min-height: 320px; }
  .editor-preview { min-height: 260px; max-height: 420px; }
  .editor-actions { position: sticky; bottom: 0; z-index: 2; padding: 10px 0; background: white; }
  .primary, .secondary, .danger, .ghost { min-height: 44px; }
  .task-row { align-items: stretch; flex-direction: column; }
  .task-actions { width: 100%; }
  .task-actions button { flex: 1; }
  .owner-meta a { overflow-wrap: anywhere; }
  .month-calendar { width: 100%; overflow: hidden; }
  .month-head, .month-grid { min-width: 0; width: 100%; grid-template-columns: repeat(7,minmax(0,1fr)); }
  .month-head span { padding: 6px 1px; font-size: 11px; }
  .month-cell { min-width: 0; min-height: 58px; padding: 5px 2px; text-align: center; border-radius: 0 !important; }
  .month-cell strong { margin: 0; font-size: 12px; }
  .month-event { display: none; }
  .month-dots { display: flex; }
  .calendar-mobile-hint { display: block; }
  .week-grid { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(78vw,300px); width: 100%; max-width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-inline: contain; padding: 2px 2px 12px; }
  .day-column { min-height: 330px; scroll-snap-align: start; }
}
@media (max-width: 420px) {
  .brand strong { font-size: 18px; }
  .brand small { font-size: 13px; }
  .owner-card { margin-bottom: 26px; }
  .page-head h1 { font-size: 26px; }
  .button-row > * { flex: 1 1 auto; text-align: center; }
  .manager-summary { grid-template-columns: 1fr; }
  .manager-summary > div { text-align: left; }
  footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 20px; }
}
@media (max-width: 520px) {
  .schedule-section .section-bar { align-items: stretch; flex-direction: column; }
  .schedule-section .section-bar .primary { width: 100%; }
  .manager-card { padding: 13px; }
  .manager-card .mini-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .manager-card .mini-actions button { width: 100%; }
  .manager-card .mini-actions button:only-child { grid-column: 1/-1; }
  .manager-card .mini-actions button:nth-last-child(3):first-child { grid-column: 1/-1; }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) {
  .editor-actions { background:#172832; }
  .side { background:#101d25; box-shadow:0 8px 24px rgba(0,0,0,.3); }
  .modal-card { background:#172832; color:var(--ink); }
}
