/* 课间 .435 · 今日节奏 / 本周概览 / 工具入口打磨；底部导航保持 .433 原样 */
:root{
  --kj-hairline: color-mix(in srgb, var(--line) 72%, transparent);
  --kj-meta: color-mix(in srgb, var(--ink) 66%, var(--muted));
  --kj-green-soft: color-mix(in srgb, var(--green) 13%, transparent);
}
body{ -webkit-tap-highlight-color: transparent; }

/* 今天：课程表顶端的一条“节奏尺”，把课量、空档和在校时长压成一眼可读 */
.td-page .td-rhythm{
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;
  gap:11px;
  margin:2px 0 14px;
  padding:11px 12px 11px 10px;
  border:1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-radius:18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--quiet) 42%, transparent));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 58%, transparent),
    0 10px 24px -22px color-mix(in srgb, var(--ink) 34%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  backdrop-filter: blur(18px) saturate(1.25);
}
.td-rhythm-mark{
  width:28px;height:28px;
  display:flex;align-items:center;justify-content:center;gap:3px;
  border-radius:10px;
  color:var(--green);
  background:var(--kj-green-soft);
  border:1px solid color-mix(in srgb, var(--green) 18%, transparent);
}
.td-rhythm-mark i{
  display:block;width:3px;border-radius:3px;
  background:currentColor;opacity:.78;
  animation:td-rhythm-breathe 2.5s ease-in-out infinite;
}
.td-rhythm-mark i:nth-child(1){height:9px;animation-delay:-.5s}
.td-rhythm-mark i:nth-child(2){height:15px;animation-delay:-1.25s}
.td-rhythm-mark i:nth-child(3){height:7px;animation-delay:-2s}
@keyframes td-rhythm-breathe{
  0%,100%{transform:scaleY(.8);opacity:.48}
  45%{transform:scaleY(1.15);opacity:.95}
}
.td-rhythm-copy{min-width:0;display:grid;gap:2px}
.td-rhythm-copy strong{
  font-size:13.5px;font-weight:650;letter-spacing:-.02em;
  color:var(--ink);font-variant-numeric:tabular-nums;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.td-rhythm-copy span{
  font-size:11px;line-height:1.35;color:var(--kj-meta);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
.td-rhythm-copy em{font-style:normal;color:#b7644a;font-weight:600}
.td-rhythm-link{
  display:inline-flex;align-items:center;gap:1px;
  min-height:32px;padding:0 9px 0 11px;
  border:1px solid color-mix(in srgb, var(--green) 20%, transparent);
  border-radius:999px;
  background:color-mix(in srgb, var(--green) 8%, var(--surface));
  color:var(--green);
  font-size:11.5px;font-weight:600;white-space:nowrap;
}
.td-rhythm-link svg{width:14px;height:14px;stroke-width:1.8}
.td-rhythm-link:active{transform:scale(.97)}

/* 明天没有课时，给一个明确的落点，而不是空白 */
.td-tomorrow-empty{display:grid;gap:3px;padding:14px 0 8px;color:var(--kj-meta)}
.td-tomorrow-empty strong{font-size:13px;font-weight:600;color:var(--ink)}
.td-tomorrow-empty small{font-size:11px;line-height:1.5}

/* 本周：概览数字压在周标题和课表之间，成为扫读入口 */
.week-insight{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin:-2px 2px 9px;
  padding:7px 9px;
  color:var(--kj-meta);font-size:11px;font-variant-numeric:tabular-nums;
  border-top:1px solid color-mix(in srgb,var(--line) 52%, transparent);
}
.week-insight span{display:inline-flex;align-items:baseline;gap:3px;min-width:0}
.week-insight b{font-size:16px;font-weight:600;color:var(--ink);letter-spacing:-.035em}
.week-insight i{width:3px;height:3px;border-radius:50%;background:color-mix(in srgb,var(--muted) 45%,transparent)}
.week-insight span:last-child{justify-content:flex-end;text-align:right}

/* 周表：大节分隔更明确，课程名多给一行呼吸空间 */
.schedule-scroll .session-break{border-top-color:color-mix(in srgb, var(--line) 82%, transparent)}
.schedule-scroll.is-compact .schedule-course strong{line-height:1.26;letter-spacing:-.025em;-webkit-line-clamp:4}
.schedule-scroll.is-compact .schedule-room{opacity:.9}
.schedule-scroll.is-compact .schedule-course.is-past{opacity:.44}

/* 辅助文字从“灰得发飘”拉回可读范围 */
.td-course-meta,.td-tomorrow-row small,.td-course-note{color:var(--kj-meta)}
.td-course-meta i{background:color-mix(in srgb,var(--muted) 55%,transparent)}

/* 工具箱：隐藏页恢复后的小标记，以及更紧凑的移动端格子 */
.tool-directory .directory-item .tool-new{
  position:absolute;right:11px;bottom:11px;
  padding:2px 6px;border-radius:999px;
  background:color-mix(in srgb, var(--green) 10%, transparent);
  color:var(--green);font-size:9px;line-height:1.5;font-weight:600;
  letter-spacing:.04em;
}
.tool-directory .directory-item.tool-new-entry{
  background:
    radial-gradient(120% 90% at 12% 0%, color-mix(in srgb,var(--green) 13%, transparent), transparent 58%),
    linear-gradient(155deg, color-mix(in srgb,var(--surface) 86%, transparent), color-mix(in srgb,var(--quiet) 48%, transparent));
}
@media(max-width:650px){
  /* 矮屏别再强行用一整屏把格子撑高 */
  html[data-theme][data-view="high"] .tool-directory{
    min-height:0 !important;
    align-content:start !important;
    padding-top:4px !important;
  }
  html[data-theme][data-view="high"] .tool-directory .directory-item{
    min-height:136px !important;
    padding:13px 12px 12px !important;
    gap:10px;
  }
  .td-page .td-rhythm{margin:0 1px 12px;padding:9px 10px 9px 8px;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;border-radius:15px}
  .td-rhythm-mark{width:24px;height:24px;border-radius:9px}
  .td-rhythm-copy strong{font-size:12.5px}
  .td-rhythm-copy span{font-size:10.5px}
  .td-rhythm-link{min-height:30px;padding:0 7px 0 9px;font-size:10.5px}
  .week-insight{gap:4px;padding:7px 3px 6px;font-size:10px}
  .week-insight b{font-size:15px}
  .week-insight span{white-space:nowrap}
  .week-insight span:last-child{overflow:hidden;text-overflow:ellipsis}
}

/* 深色主题：让新加的玻璃和辅助字不会发灰 */
html[data-scheme="dark"] .td-rhythm{
  border-color:color-mix(in srgb,#fff 10%,transparent);
  background:linear-gradient(135deg,color-mix(in srgb,#fff 9%,transparent),color-mix(in srgb,#fff 3%,transparent));
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 12%,transparent),0 10px 24px -22px #000;
}
html[data-scheme="dark"] .td-rhythm-copy strong{color:#f2eee5}
html[data-scheme="dark"] .td-rhythm-copy span{color:#aaa69b}
html[data-scheme="dark"] .td-rhythm-mark{background:color-mix(in srgb,var(--green) 18%,transparent);border-color:color-mix(in srgb,var(--green) 28%,transparent)}
html[data-scheme="dark"] .td-rhythm-link{background:color-mix(in srgb,var(--green) 16%,transparent);border-color:color-mix(in srgb,var(--green) 28%,transparent);color:#9fcbb5}
html[data-scheme="dark"] .td-tomorrow-empty small{color:#aaa69b}
html[data-scheme="dark"] .week-insight{border-top-color:color-mix(in srgb,#fff 12%,transparent)}
html[data-scheme="dark"] .week-insight b{color:#f2eee5}
html[data-scheme="dark"] .week-insight span{color:#aaa69b}
html[data-scheme="dark"] .td-course-meta,html[data-scheme="dark"] .td-tomorrow-row small,html[data-scheme="dark"] .td-course-note{color:#aaa69b}

/* 周表高度收在底栏之上，避免课表被底栏遮住 */
@media(max-width:650px){
  body[data-page="week"] .schedule-scroll.is-compact{max-height:calc(100vh - 330px) !important;max-height:calc(100dvh - 330px) !important}
}

@media(prefers-reduced-motion:reduce){
  .td-rhythm-mark i{animation:none;opacity:.72}
}

/* 「我的」的同步提示：从中橙警告降为一行低干扰状态 */
.my-warn.my-warn-soft{
  border-color:color-mix(in srgb,var(--line) 74%, transparent);
  background:color-mix(in srgb,var(--quiet) 58%, transparent);
  color:var(--kj-meta);
}
.my-warn.my-warn-soft button{
  border-color:color-mix(in srgb,var(--line) 78%, transparent);
  background:color-mix(in srgb,var(--surface) 64%, transparent);
  color:var(--kj-meta);
}
html[data-scheme="dark"] .my-warn.my-warn-soft{
  border-color:color-mix(in srgb,#fff 11%,transparent);
  background:color-mix(in srgb,#fff 5%,transparent);
  color:#aaa69b;
}
html[data-scheme="dark"] .my-warn.my-warn-soft button{
  border-color:color-mix(in srgb,#fff 14%,transparent);
  background:color-mix(in srgb,#fff 7%,transparent);
  color:#ccc7bd;
}

/* 周表滚动时，今天列自动居中只动横向，不再把表头滚到课程上 */
.schedule-scroll .schedule-head{
  z-index:5;
  background:color-mix(in srgb,var(--surface) 94%, transparent) !important;
  -webkit-backdrop-filter:blur(16px) saturate(1.1);
  backdrop-filter:blur(16px) saturate(1.1);
}
.schedule-scroll .schedule-corner{z-index:6;background:color-mix(in srgb,var(--surface) 94%, transparent) !important}
.schedule-scroll .schedule-times{z-index:6}
.schedule-scroll .schedule-course{z-index:2}

/* 「我的」无任务时的低干扰空状态 */
.my-empty.my-empty-quiet{
  border-color:color-mix(in srgb,var(--line) 72%, transparent);
  background:linear-gradient(155deg,color-mix(in srgb,var(--surface) 62%,transparent),color-mix(in srgb,var(--quiet) 34%,transparent));
}
.my-empty-actions{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:2px}
.my-empty-actions .my-btn{margin:0}
html[data-scheme="dark"] .my-empty.my-empty-quiet{
  border-color:color-mix(in srgb,#fff 12%,transparent);
  background:linear-gradient(155deg,color-mix(in srgb,#fff 7%,transparent),color-mix(in srgb,#fff 3%,transparent));
}

@media(max-width:380px){
  .td-now-status{font-size:11px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;max-width:245px}
  .schedule-scroll.is-compact .schedule-course strong{font-size:10.5px;line-height:1.3}
  .schedule-scroll.is-compact .schedule-room{font-size:10.5px}
}
