/* ------------------------------------------------------------------
   两个人的课表 · 视觉样式
   配色：奶油纸张底 + 蓝（我）/ 粉（TA）+ 少量珊瑚红点缀
------------------------------------------------------------------- */

:root {
  --bg: #fbf7f4;
  --paper: #fffdfb;
  --ink: #2b2530;
  --ink-soft: #514852;
  --muted: #8d8089;
  --faint: #b6aab1;
  --line: rgba(63, 43, 56, 0.1);
  --line-soft: rgba(63, 43, 56, 0.06);
  --me: #5b7cfa;
  --me-deep: #3e57c9;
  --me-soft: #e9eeff;
  --me-tint: #f5f7ff;
  --ta: #ef7396;
  --ta-deep: #c94c70;
  --ta-soft: #ffe9f0;
  --ta-tint: #fff6f9;
  --coral: #e96376;
  --green: #4b936d;
  --green-soft: #eaf5ee;
  --hour-h: 54px;
  --radius-xl: 30px;
  --shadow-card: 0 24px 70px -34px rgba(57, 35, 48, 0.28);
  --shadow-soft: 0 12px 36px -24px rgba(57, 35, 48, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family:
    "Avenir Next", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

::selection {
  color: #fff;
  background: var(--ta);
}

:focus-visible {
  outline: 2px solid var(--ta);
  outline-offset: 3px;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 58vw;
  height: 58vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(4px);
}

.ambient-one {
  top: -28vw;
  left: -16vw;
  background: radial-gradient(circle, rgba(239, 115, 150, 0.16), transparent 68%);
}

.ambient-two {
  right: -26vw;
  bottom: -32vw;
  background: radial-gradient(circle, rgba(91, 124, 250, 0.13), transparent 68%);
}

.grain {
  position: fixed;
  z-index: 999;
  inset: 0;
  opacity: 0.17;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.page {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 26px clamp(20px, 3.6vw, 48px) 42px;
}

/* ------------------------------- 顶栏 ------------------------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}

.brand-mark {
  position: relative;
  width: 29px;
  height: 19px;
  flex: 0 0 auto;
}

.brand-mark i {
  position: absolute;
  top: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  mix-blend-mode: multiply;
}

.brand-mark i:first-child {
  left: 0;
  background: var(--me);
}

.brand-mark i:last-child {
  right: 0;
  background: var(--ta);
  opacity: 0.86;
}

.brand-en {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-style: italic;
  letter-spacing: -0.015em;
}

.brand-rule {
  width: 1px;
  height: 12px;
  margin: 0 1px;
  background: var(--line);
}

.brand-cn {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.demo-badge {
  padding: 4px 8px;
  color: #b25a6d;
  background: rgba(239, 115, 150, 0.1);
  border: 1px solid rgba(239, 115, 150, 0.16);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* -------------------------------- 首屏 ------------------------------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 42px;
  padding: clamp(34px, 5vw, 60px) 2px clamp(26px, 3.4vw, 42px);
}

.eyebrow,
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.hero h1 {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 15px 0 0;
  font-size: clamp(46px, 6.6vw, 82px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1;
}

.title-heart {
  display: inline-flex;
  width: 0.43em;
  height: 0.43em;
  margin-left: 0.04em;
  color: var(--ta);
  transform: translateY(-0.12em) rotate(-7deg);
  filter: drop-shadow(0 6px 12px rgba(239, 115, 150, 0.18));
}

.title-heart svg {
  width: 100%;
  height: 100%;
}

.hero-sub {
  max-width: 520px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.85;
  letter-spacing: 0.015em;
}

.hero-sub .person-name {
  color: var(--ink-soft);
  font-weight: 650;
}

.hero-sub .amp {
  margin: 0 4px;
  color: var(--ta);
  font-family: "Iowan Old Style", Georgia, serif;
  font-style: italic;
  font-size: 15px;
}

.clock-card {
  position: relative;
  width: 292px;
  padding: 19px 21px 20px;
  overflow: hidden;
  background: rgba(255, 253, 251, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgba(63, 43, 56, 0.035),
    0 26px 60px -32px rgba(57, 35, 48, 0.4);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.clock-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, var(--me), var(--ta));
  border-radius: 0 0 2px 2px;
  opacity: 0.62;
}

.clock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clock-week {
  color: var(--ta-deep);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.clock-zone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.clock-zone i {
  width: 5px;
  height: 5px;
  background: #6ca783;
  border-radius: 50%;
}

.clock-time {
  margin-top: 13px;
  color: var(--ink);
  font-family: "Avenir Next", "SF Pro Display", "Segoe UI", sans-serif;
  font-size: 45px;
  font-weight: 300;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.clock-time span {
  margin-left: 1px;
  color: var(--faint);
  font-size: 22px;
  font-weight: 350;
}

.clock-date {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

/* ------------------------------- 区块标题 ------------------------------ */

.block-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 15px;
  padding: 0 2px;
}

.block-heading h2 {
  margin: 8px 0 0;
  font-size: 23px;
  font-weight: 660;
  letter-spacing: -0.035em;
}

.block-note {
  margin: 0;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.02em;
}

.live-pip {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(75, 147, 109, 0.1);
  animation: livePulse 2.4s ease-in-out infinite;
}

/* ------------------------------- 状态卡 ------------------------------- */

.status-block {
  margin-bottom: 25px;
}

.status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 58px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.status-card {
  --c: var(--me);
  --deep: var(--me-deep);
  --soft: var(--me-soft);
  --tint: var(--me-tint);
  position: relative;
  min-width: 0;
  min-height: 164px;
  padding: 21px 23px 19px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tint), #fffdfb 66%);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c) 9%, transparent), transparent 46%),
    linear-gradient(135deg, var(--tint), #fffdfb 66%);
  border: 1px solid rgba(63, 43, 56, 0.07);
  border: 1px solid color-mix(in srgb, var(--c) 12%, rgba(63, 43, 56, 0.04));
  border-radius: 25px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.status-card[data-person="ta"] {
  --c: var(--ta);
  --deep: var(--ta-deep);
  --soft: var(--ta-soft);
  --tint: var(--ta-tint);
}

.status-card[data-busy="true"] {
  border-color: var(--c);
  border-color: color-mix(in srgb, var(--c) 25%, transparent);
  box-shadow: var(--shadow-soft);
  box-shadow:
    0 18px 42px -30px color-mix(in srgb, var(--c) 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--c) 6%, transparent);
}

.status-card[data-pending="true"] {
  background: linear-gradient(135deg, #fbf8f5, #fffdfb 68%);
  border-style: dashed;
  border-color: rgba(63, 43, 56, 0.12);
  box-shadow: none;
}

.status-card[data-pending="true"] .avatar {
  opacity: 0.7;
  filter: saturate(0.55);
}

.status-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(63, 43, 56, 0.05);
  border: 1px solid color-mix(in srgb, var(--c) 8%, transparent);
  border-radius: 50%;
  pointer-events: none;
}

.status-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.avatar {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--c), var(--deep));
  border-radius: 14px;
  box-shadow: 0 8px 18px -9px rgba(63, 43, 56, 0.28);
  box-shadow: 0 8px 18px -9px color-mix(in srgb, var(--c) 75%, transparent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.who {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.person-name {
  font-size: 14px;
  font-weight: 680;
  letter-spacing: 0.02em;
}

.person-en {
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.state-pill i {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.state-pill.busy {
  color: #fff;
  background: var(--c);
  box-shadow: 0 7px 16px -8px rgba(63, 43, 56, 0.45);
  box-shadow: 0 7px 16px -8px color-mix(in srgb, var(--c) 80%, transparent);
}

.state-pill.busy i {
  background: #fff;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.state-pill.free {
  color: #3f7c5a;
  background: var(--green-soft);
}

.state-pill.pending {
  color: #8d7668;
  background: #f3ece6;
}

.state-pill.pending i {
  background: #b19887;
}

.status-body {
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.status-course {
  display: -webkit-box;
  min-height: 25px;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.status-course.is-free {
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 580;
  letter-spacing: -0.015em;
}

.status-course.is-pending {
  color: var(--muted);
  font-size: 17px;
  font-weight: 580;
  letter-spacing: -0.015em;
}

.status-meta {
  min-height: 17px;
  margin: 7px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-meta strong {
  color: var(--deep);
  font-weight: 650;
}

.status-progress {
  height: 3px;
  margin-top: 14px;
  overflow: hidden;
  background: rgba(63, 43, 56, 0.08);
  background: color-mix(in srgb, var(--c) 9%, transparent);
  border-radius: 99px;
}

.status-progress span {
  display: block;
  height: 100%;
  background: var(--c);
  background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 58%, #fff));
  border-radius: inherit;
  transition: width 1s linear;
}

.status-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--ta);
}

.bridge-heart {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--ta);
  background: rgba(255, 253, 251, 0.88);
  border: 1px solid rgba(239, 115, 150, 0.13);
  border-radius: 50%;
  box-shadow: 0 10px 22px -16px rgba(201, 76, 112, 0.7);
  font-size: 14px;
  line-height: 1;
}

.bridge-label {
  color: var(--faint);
  font-size: 8.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-bridge.is-together .bridge-heart {
  color: #fff;
  background: var(--ta);
  border-color: transparent;
  animation: heartBeat 2.8s ease-in-out infinite;
}

.status-bridge.is-together .bridge-label {
  color: var(--ta-deep);
  font-weight: 650;
}

.status-bridge.is-pending .bridge-label {
  color: var(--ta-deep);
  font-weight: 650;
}

/* ------------------------------- 课表卡片 ------------------------------ */

.schedule-card {
  overflow: hidden;
  background: rgba(255, 253, 251, 0.87);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-xl);
  box-shadow:
    inset 0 0 0 1px rgba(63, 43, 56, 0.035),
    var(--shadow-card);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.schedule-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 26px 0;
}

.schedule-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 7px;
}

.schedule-title h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 680;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.week-badge {
  padding: 4px 8px;
  color: var(--ink-soft);
  background: #f4eeeb;
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.this-week {
  padding: 4px 8px;
  color: var(--ta-deep);
  background: rgba(239, 115, 150, 0.09);
  border: 1px solid rgba(239, 115, 150, 0.1);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.this-week[hidden] {
  display: none;
}

.week-range {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.07em;
}

.schedule-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 2px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 12px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 550;
  letter-spacing: 0.02em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ghost-btn svg {
  width: 13px;
  height: 13px;
  color: var(--ta);
}

.ghost-btn:hover {
  color: var(--ta-deep);
  background: var(--ta-tint);
  border-color: rgba(239, 115, 150, 0.24);
}

.ghost-btn:disabled {
  cursor: default;
  opacity: 0.42;
}

.ghost-btn:disabled:hover {
  color: var(--ink-soft);
  background: #fff;
  border-color: var(--line);
}

.stepper {
  display: flex;
  align-items: center;
  gap: 1px;
  height: 36px;
  padding: 0 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.step-btn {
  display: grid;
  width: 27px;
  height: 27px;
  padding: 0;
  place-items: center;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.step-btn svg {
  width: 15px;
  height: 15px;
}

.step-btn:hover:not(:disabled) {
  color: var(--ink);
  background: #f5efec;
}

.step-btn:disabled {
  cursor: default;
  opacity: 0.25;
}

.step-index {
  min-width: 39px;
  color: var(--muted);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  text-align: center;
}

.schedule-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 26px 13px;
}

.legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.legend-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  color: var(--deep);
  background: var(--tint);
  border: 1px solid rgba(63, 43, 56, 0.06);
  border: 1px solid color-mix(in srgb, var(--c) 12%, transparent);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.legend-person[data-person="me"] {
  --c: var(--me);
  --deep: var(--me-deep);
  --tint: var(--me-tint);
}

.legend-person[data-person="ta"] {
  --c: var(--ta);
  --deep: var(--ta-deep);
  --tint: var(--ta-tint);
}

.legend-person i {
  width: 6px;
  height: 6px;
  background: var(--c);
  border-radius: 50%;
}

.legend-shared {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 2px 5px 6px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.legend-shared b {
  color: var(--ta);
  font-size: 10px;
  font-weight: 500;
}

.legend-pending {
  margin-left: 1px;
  padding: 1px 4px;
  color: #8d7668;
  background: #f3ece6;
  border-radius: 999px;
  font-size: 7.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.legend-self {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 2px 5px 6px;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.legend-self b {
  color: var(--me);
  font-size: 9px;
  font-weight: 500;
}

.interaction-note {
  margin: 0;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.interaction-note span {
  margin: 0 4px;
  opacity: 0.55;
}

/* ------------------------------- 星期条 ------------------------------- */

.day-strip-wrap {
  display: none;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.day-chip {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 1px 7px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.day-chip:hover {
  background: #f7f1ee;
}

.day-chip.is-selected {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 18px -12px rgba(43, 37, 48, 0.75);
}

.day-chip.is-today:not(.is-selected) {
  color: var(--ta-deep);
  background: var(--ta-tint);
  border-color: rgba(239, 115, 150, 0.14);
}

.chip-week {
  font-size: 9.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
}

.chip-date {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  opacity: 0.66;
}

.chip-dots {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 4px;
  margin-top: 2px;
}

.chip-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
}

.chip-dots i[data-person="me"] {
  background: var(--me);
}

.chip-dots i[data-person="ta"] {
  background: var(--ta);
}

.chip-dots .chip-empty {
  width: 4px;
  height: 1px;
  background: currentColor;
  border-radius: 0;
  opacity: 0.3;
}

.day-chip.is-selected .chip-dots i[data-person="me"] {
  background: #9db1ff;
}

.day-chip.is-selected .chip-dots i[data-person="ta"] {
  background: #ffb0c6;
}

/* -------------------------------- 课表 -------------------------------- */

.timetable-viewport {
  padding: 0 22px;
}

.timetable {
  display: grid;
  grid-template-columns: 54px repeat(7, minmax(0, 1fr));
  grid-template-rows: auto var(--grid-height, 700px);
  column-gap: 6px;
  row-gap: 7px;
  min-width: 0;
}

.time-corner {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 11px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.day-head {
  min-width: 0;
  padding: 8px 5px 8px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid transparent;
  border-radius: 13px;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.day-head.is-today {
  background: rgba(239, 115, 150, 0.065);
  border-color: rgba(239, 115, 150, 0.14);
}

.day-head-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.day-name {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.day-head.is-today .day-name {
  color: var(--ta-deep);
}

.today-tag {
  padding: 2px 4px;
  color: var(--ta-deep);
  background: rgba(239, 115, 150, 0.11);
  border-radius: 4px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.day-date {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.lane-labels {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  margin-top: 5px;
  color: var(--faint);
  font-size: 7.5px;
  line-height: 1;
}

.lane-labels span {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lane-labels i {
  display: block;
  width: 3px;
  height: 3px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.lane-labels [data-person="me"] i {
  background: var(--me);
}

.lane-labels [data-person="ta"] i {
  background: var(--ta);
}

.lane-labels .is-pending {
  opacity: 0.52;
}

.time-rail {
  position: relative;
  height: var(--grid-height, 700px);
}

.time-rail span {
  position: absolute;
  right: 7px;
  color: var(--faint);
  font-size: 8.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
  transform: translateY(-50%);
}

.time-rail span:first-child {
  transform: translateY(0);
}

.day-body {
  position: relative;
  height: var(--grid-height, 700px);
  min-width: 0;
  overflow: hidden;
  background-color: rgba(255, 255, 255, 0.72);
  background-image:
    linear-gradient(to bottom, rgba(63, 43, 56, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(63, 43, 56, 0.022) 1px, transparent 1px);
  background-size:
    100% var(--hour-h),
    100% calc(var(--hour-h) / 2);
  border: 1px solid rgba(63, 43, 56, 0.045);
  border-radius: 14px;
}

.day-body::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(63, 43, 56, 0.045);
  pointer-events: none;
}

.day-body.is-today {
  border-color: rgba(239, 115, 150, 0.16);
  background-color: rgba(255, 251, 252, 0.84);
}

.day-body.is-single-lane::before {
  display: none;
}

.day-body.is-weekend {
  background-color: rgba(250, 246, 243, 0.58);
}

.course-card {
  position: absolute;
  z-index: 2;
  display: flex;
  min-height: 25px;
  flex-direction: column;
  padding: 7px 6px 6px 8px;
  overflow: hidden;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(155deg, var(--soft), #fff);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--soft) 88%, #fff), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(63, 43, 56, 0.09);
  border: 1px solid color-mix(in srgb, var(--c) 18%, transparent);
  border-left: 3px solid var(--c);
  border-radius: 9px;
  box-shadow: 0 4px 12px -8px rgba(63, 43, 56, 0.25);
  box-shadow: 0 4px 12px -8px color-mix(in srgb, var(--deep) 36%, transparent);
  font-family: inherit;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease;
}

.course-card:hover {
  z-index: 4;
  border-color: var(--c);
  border-color: color-mix(in srgb, var(--c) 38%, transparent);
  box-shadow: 0 10px 20px -14px rgba(63, 43, 56, 0.45);
  box-shadow: 0 10px 20px -14px color-mix(in srgb, var(--deep) 65%, transparent);
  transform: translateY(-1px);
}

.course-card:active {
  transform: translateY(0);
}

.course-card[data-person="me"] {
  --c: var(--me);
  --deep: var(--me-deep);
  --soft: var(--me-soft);
}

.course-card[data-person="ta"] {
  --c: var(--ta);
  --deep: var(--ta-deep);
  --soft: var(--ta-soft);
}

.course-time {
  display: flex;
  align-items: baseline;
  gap: 1px;
  overflow: hidden;
  color: var(--deep);
  color: color-mix(in srgb, var(--deep) 70%, var(--muted));
  font-size: 8px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
}

.course-start,
.course-end {
  display: inline-block;
}

.course-end::before {
  content: "–";
  margin-right: 1px;
  opacity: 0.6;
}

.course-title {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink);
  font-size: 11px;
  font-weight: 690;
  letter-spacing: -0.02em;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.course-meta {
  display: block;
  margin-top: auto;
  padding-top: 5px;
  overflow: hidden;
  color: var(--muted);
  color: color-mix(in srgb, var(--deep) 55%, var(--muted));
  font-size: 8px;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-meta.is-empty-room {
  color: color-mix(in srgb, var(--deep) 60%, var(--muted));
  font-weight: 650;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.course-heart {
  display: inline-block;
  margin-left: 1px;
  color: var(--ta);
  font-size: 7px;
  font-weight: 500;
  line-height: 1;
  vertical-align: 1px;
}

.course-card.is-short .course-meta {
  display: none;
}

.course-card.is-tiny {
  padding-top: 5px;
}

.course-card.is-tiny .course-time {
  display: none;
}

.course-card.is-tiny .course-title {
  margin-top: 0;
  font-size: 10px;
  -webkit-line-clamp: 2;
}

.course-card.is-self-study {
  z-index: 1;
  background:
    repeating-linear-gradient(
      135deg,
      color-mix(in srgb, var(--c) 7%, transparent) 0,
      color-mix(in srgb, var(--c) 7%, transparent) 5px,
      transparent 5px,
      transparent 11px
    ),
    linear-gradient(155deg, var(--soft), #fff);
  border-style: dashed;
  border-left-style: solid;
}

.course-card.is-self-study.is-live {
  z-index: 1;
}

.course-card.is-self-study .course-title {
  color: var(--deep);
}

.course-card.is-evening-study::before {
  content: "晚自习";
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: color-mix(in srgb, var(--deep) 72%, var(--muted));
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.course-card.is-evening-study .course-meta {
  padding-right: 27px;
}

.course-card.is-live {
  z-index: 3;
  border-color: var(--c);
  border-color: color-mix(in srgb, var(--c) 58%, transparent);
  box-shadow: 0 10px 24px -14px rgba(63, 43, 56, 0.45);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--c) 20%, transparent),
    0 10px 24px -14px color-mix(in srgb, var(--deep) 58%, transparent);
}

.course-card.is-live::after {
  content: "";
  position: absolute;
  top: 6px;
  left: -1px;
  width: 5px;
  height: 5px;
  background: var(--c);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(63, 43, 56, 0.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent);
  animation: dotPulse 1.8s ease-in-out infinite;
}

.now-line {
  position: absolute;
  z-index: 1;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--coral), rgba(233, 99, 118, 0.45));
  box-shadow: 0 0 6px rgba(233, 99, 118, 0.28);
  pointer-events: none;
}

.now-line::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 5px;
  height: 5px;
  background: var(--coral);
  border-radius: 50%;
}

.day-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  text-align: center;
  transform: translate(-50%, -50%);
}

.day-empty .empty-icon {
  font-size: 23px;
  line-height: 1;
  opacity: 0.7;
}

.day-empty strong {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.day-empty small {
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.schedule-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 13px;
  padding: 16px 26px 20px;
  color: var(--faint);
  border-top: 1px solid var(--line-soft);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.schedule-foot span:last-child {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ------------------------------- 页脚 -------------------------------- */

.page-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 3px 0;
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.03em;
}

.page-foot-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.foot-heart {
  color: var(--ta);
  font-size: 9px;
}

.page-foot-demo {
  color: var(--faint);
  opacity: 0.8;
}

.page-foot-demo[hidden] {
  display: none;
}

/* ------------------------------- 弹层 -------------------------------- */

.modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(36, 27, 33, 0.38);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.22s ease both;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(84vh, 720px);
  padding: 30px 30px 26px;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  box-shadow: 0 40px 100px -30px rgba(35, 23, 31, 0.55);
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal-accent {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 5px;
  background: var(--modal-c, var(--me));
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  color: var(--muted);
  background: #f7f1ee;
  border: 0;
  border-radius: 50%;
  transition: color 0.2s ease, background 0.2s ease;
}

.modal-close:hover {
  color: var(--ink);
  background: #eee4df;
}

.modal-close svg {
  width: 14px;
  height: 14px;
}

.modal-person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 34px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.03em;
}

.modal-avatar {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--modal-c, var(--me)), var(--modal-deep, var(--me-deep)));
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
}

.modal-title {
  margin: 17px 0 0;
  padding-right: 24px;
  font-size: clamp(27px, 5vw, 34px);
  font-weight: 690;
  letter-spacing: -0.045em;
  line-height: 1.18;
}

.modal-time {
  margin: 9px 0 0;
  color: var(--modal-deep, var(--me-deep));
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  font-weight: 550;
  letter-spacing: 0.01em;
}

.modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
  margin: 23px 0 0;
  padding: 19px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.modal-details div {
  min-width: 0;
}

.modal-details dt {
  margin: 0 0 5px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.modal-details dd {
  margin: 0;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.room-editor {
  margin-top: 15px;
  padding: 13px;
  background: #faf5f2;
  border: 1px dashed rgba(63, 43, 56, 0.14);
  border-radius: 14px;
}

.room-editor[hidden] {
  display: none;
}

.room-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.room-editor-head span:last-child {
  color: var(--faint);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.room-editor-row {
  display: flex;
  gap: 8px;
  margin-top: 9px;
}

.room-input {
  min-width: 0;
  height: 37px;
  flex: 1;
  padding: 0 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.room-input::placeholder {
  color: var(--faint);
}

.room-input:focus {
  border-color: var(--ta);
  outline: none;
  box-shadow: 0 0 0 3px rgba(239, 115, 150, 0.1);
}

.room-save {
  height: 37px;
  flex: 0 0 auto;
  padding: 0 14px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.16s ease;
}

.room-save:hover {
  background: #403745;
}

.room-save:active {
  transform: translateY(1px);
}

.room-editor-hint {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.modal-weeks {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.modal-weeks-label {
  flex: 0 0 auto;
  padding-top: 1px;
  color: var(--faint);
  font-size: 8.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
}

.modal-together {
  margin-top: 15px;
  padding: 11px 13px;
  color: var(--ta-deep);
  background: var(--ta-tint);
  border: 1px solid rgba(239, 115, 150, 0.14);
  border-radius: 12px;
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.02em;
}

.modal-together[hidden] {
  display: none;
}

.modal-together span {
  margin-right: 3px;
  color: var(--ta);
}

/* -------------------------------- Toast ------------------------------- */

.toast {
  position: fixed;
  z-index: 120;
  bottom: 30px;
  left: 50%;
  padding: 10px 16px;
  color: #fff;
  background: rgba(43, 37, 48, 0.92);
  border-radius: 999px;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.noscript {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 200;
  padding: 14px;
  color: #fff;
  background: #2b2530;
  border-radius: 12px;
  text-align: center;
}

/* ------------------------------- 动画 -------------------------------- */

@keyframes livePulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(75, 147, 109, 0.08);
    opacity: 0.8;
  }
  50% {
    box-shadow: 0 0 0 6px rgba(75, 147, 109, 0.04);
    opacity: 1;
  }
}

@keyframes dotPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.78);
  }
}

@keyframes heartBeat {
  0%,
  100% {
    transform: scale(1);
  }
  12% {
    transform: scale(1.1);
  }
  22% {
    transform: scale(1);
  }
  32% {
    transform: scale(1.06);
  }
  44% {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 窄一些的桌面：把课卡里的开始 / 结束时间拆成两行，避免被截断 */
@media (min-width: 1101px) and (max-width: 1320px) {
  .course-time {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    font-size: 7.5px;
    letter-spacing: 0;
    line-height: 1.2;
  }

  .course-title {
    font-size: 10.5px;
  }

  .course-meta {
    font-size: 7.5px;
  }

  .course-card.is-short .course-time {
    display: none;
  }
}

/* --------------------------- 手机 / 窄屏 ---------------------------- */

@media (max-width: 1100px) {
  .page {
    padding: 20px 16px 32px;
  }

  .topbar {
    gap: 12px;
  }

  .brand-en {
    font-size: 16px;
  }

  .brand-rule,
  .brand-cn,
  .topbar-meta #semesterName {
    display: none;
  }

  .demo-badge {
    font-size: 8.5px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 32px 1px 27px;
  }

  .hero h1 {
    margin-top: 13px;
    font-size: clamp(43px, 13vw, 60px);
    letter-spacing: -0.05em;
  }

  .hero-sub {
    margin-top: 14px;
    font-size: 12.5px;
    line-height: 1.75;
  }

  .clock-card {
    width: 100%;
    padding: 15px 18px 16px;
    border-radius: 21px;
  }

  .clock-time {
    margin-top: 8px;
    font-size: 38px;
  }

  .clock-time span {
    font-size: 19px;
  }

  .clock-date {
    margin-top: 5px;
    font-size: 10.5px;
  }

  .block-heading {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .block-heading h2 {
    margin-top: 7px;
    font-size: 20px;
  }

  .block-note {
    display: none;
  }

  .status-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .status-card {
    min-height: 0;
    padding: 18px 18px 17px;
    border-radius: 22px;
  }

  .avatar {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    font-size: 12px;
  }

  .state-pill {
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .status-body {
    margin-top: 15px;
  }

  .status-course {
    min-height: 23px;
    font-size: 18px;
  }

  .status-course.is-free {
    font-size: 15.5px;
  }

  .status-meta {
    margin-top: 5px;
    font-size: 10.5px;
  }

  .status-progress {
    margin-top: 12px;
  }

  .status-bridge {
    height: 36px;
    flex-direction: row;
    gap: 7px;
  }

  .bridge-heart {
    width: 28px;
    height: 28px;
    font-size: 10px;
    box-shadow: none;
  }

  .bridge-label {
    writing-mode: horizontal-tb;
    font-size: 8px;
  }

  .schedule-card {
    border-radius: 24px;
  }

  .schedule-head {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    padding: 20px 18px 0;
  }

  .schedule-title h2 {
    font-size: 23px;
  }

  .schedule-actions {
    justify-content: space-between;
    gap: 8px;
  }

  .ghost-btn {
    height: 34px;
    padding: 0 11px;
    font-size: 10px;
  }

  .stepper {
    height: 34px;
  }

  .schedule-sub {
    padding: 14px 18px 0;
  }

  .interaction-note {
    display: none;
  }

  .day-strip-wrap {
    display: block;
    padding: 12px 18px 8px;
  }

  .timetable-viewport {
    padding: 2px 12px 8px;
  }

  .timetable {
    grid-template-columns: 43px minmax(0, 1fr);
    grid-template-rows: auto var(--grid-height, 700px);
    column-gap: 5px;
    row-gap: 6px;
  }

  .time-corner {
    padding-bottom: 9px;
    font-size: 7px;
  }

  .day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 13px;
    border-radius: 12px;
    text-align: left;
  }

  .day-head-top {
    justify-content: flex-start;
    gap: 6px;
  }

  .day-name {
    font-size: 12px;
  }

  .day-date {
    margin-top: 0;
    font-size: 9.5px;
  }

  .today-tag {
    display: inline-block;
    padding: 2px 5px;
    font-size: 7.5px;
  }

  .lane-labels {
    width: auto;
    justify-content: flex-end;
    gap: 11px;
    margin-top: 0;
    font-size: 8px;
  }

  .lane-labels i {
    width: 4px;
    height: 4px;
  }

  .time-rail {
    height: var(--grid-height, 700px);
  }

  .time-rail span {
    right: 5px;
    font-size: 8px;
  }

  .day-body {
    border-radius: 13px;
  }

  .course-card {
    padding: 8px 8px 7px 9px;
    border-radius: 10px;
    border-left-width: 3px;
  }

  .course-time {
    font-size: 8.5px;
  }

  .course-title {
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.3;
    -webkit-line-clamp: 4;
  }

  .course-meta {
    padding-top: 5px;
    font-size: 9px;
  }

  .course-card.is-tiny .course-title {
    font-size: 11.5px;
  }

  .day-empty .empty-icon {
    font-size: 26px;
  }

  .day-empty strong {
    font-size: 13px;
  }

  .schedule-foot {
    margin-top: 8px;
    padding: 13px 18px 16px;
    font-size: 8.5px;
  }

  .page-foot {
    justify-content: center;
    padding-top: 20px;
    font-size: 8.5px;
    text-align: center;
  }

  .page-foot-demo {
    display: none;
  }

  .modal {
    align-items: end;
    padding: 0;
  }

  .modal-card {
    width: 100%;
    max-height: 88vh;
    padding: 26px 22px calc(23px + env(safe-area-inset-bottom));
    border-radius: 26px 26px 0 0;
    animation-name: sheetIn;
  }

  .modal-details {
    gap: 14px;
    margin-top: 19px;
    padding: 16px 0;
  }

  .modal-title {
    font-size: 27px;
  }

  .toast {
    bottom: 22px;
  }
}

/* 平板：把内容收成一条舒适的阅读宽度，状态卡并排 */
@media (min-width: 700px) and (max-width: 1100px) {
  .page {
    max-width: 820px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .status-grid {
    grid-template-columns: minmax(0, 1fr) 50px minmax(0, 1fr);
    gap: 10px;
  }

  .status-card {
    min-height: 164px;
    padding: 18px;
  }

  .status-bridge {
    height: auto;
    flex-direction: column;
    gap: 6px;
  }

  .bridge-heart {
    width: 32px;
    height: 32px;
  }

  .status-course {
    font-size: 18px;
  }

  .status-meta {
    font-size: 10.5px;
  }
}

@media (max-width: 390px) {
  .page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .day-strip-wrap {
    padding-right: 13px;
    padding-left: 13px;
  }

  .schedule-head {
    padding-right: 14px;
    padding-left: 14px;
  }

  .schedule-sub {
    padding-right: 14px;
    padding-left: 14px;
  }

  .schedule-foot {
    padding-right: 14px;
    padding-left: 14px;
  }

  .timetable-viewport {
    padding-right: 8px;
    padding-left: 8px;
  }

  .day-chip {
    padding-top: 7px;
    padding-bottom: 6px;
  }

  .chip-week {
    font-size: 9px;
  }

  .chip-date {
    font-size: 8.5px;
  }

  .status-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .status-course {
    font-size: 17px;
  }

  .state-pill {
    padding: 6px 8px;
  }
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ------------------------------- 开屏动画 ------------------------------ */

.splash {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(160deg, #fffaf6, #fbf2f5 58%, #f5f1fb);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s;
  animation: splashFallback 0.45s ease 2.4s forwards;
}

.splash.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(72vmax, 720px);
  height: min(72vmax, 720px);
  background:
    radial-gradient(circle at 36% 42%, rgba(91, 124, 250, 0.18), transparent 52%),
    radial-gradient(circle at 66% 55%, rgba(239, 115, 150, 0.2), transparent 54%);
  border-radius: 50%;
  filter: blur(26px);
  transform: translate(-50%, -52%);
  animation: splashAura 1.6s ease both;
}

.splash-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  text-align: center;
  animation: splashContent 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-icon {
  width: 92px;
  height: 92px;
  border-radius: 25px;
  box-shadow:
    0 24px 44px -24px rgba(89, 51, 77, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.65);
  animation: splashIcon 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.splash-eyebrow {
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
}

.splash-title {
  margin: 11px 0 0;
  color: var(--ink);
  font-size: 34px;
  font-weight: 720;
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.splash-names {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.splash-names span {
  display: inline-block;
  margin: 0 5px;
  color: var(--ta);
  font-size: 9px;
  animation: heartBeat 2s ease-in-out infinite;
}

.splash-progress {
  width: 116px;
  height: 2px;
  margin-top: 28px;
  overflow: hidden;
  background: rgba(63, 43, 56, 0.08);
  border-radius: 99px;
}

.splash-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--me), var(--ta));
  border-radius: inherit;
  animation: splashProgress 1.35s 0.12s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes splashIcon {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.8) rotate(-3deg);
  }
  62% {
    opacity: 1;
    transform: translateY(-2px) scale(1.03) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

@keyframes splashContent {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes splashAura {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(0.86);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -52%) scale(1);
  }
}

@keyframes splashProgress {
  0% {
    width: 0;
  }
  70% {
    width: 78%;
  }
  100% {
    width: 100%;
  }
}

@keyframes splashFallback {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* ----------------------------- 安装到桌面 ----------------------------- */

.install-tip {
  position: fixed;
  z-index: 90;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  width: min(430px, calc(100vw - 24px));
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  background: rgba(255, 253, 251, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow:
    0 18px 44px -20px rgba(57, 35, 48, 0.44),
    inset 0 0 0 1px rgba(63, 43, 56, 0.045);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
  animation: installTipIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.install-tip[hidden] {
  display: none;
}

.install-tip-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  box-shadow: 0 6px 14px -8px rgba(57, 35, 48, 0.4);
}

.install-tip-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.install-tip-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-tip-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-tip-action {
  height: 32px;
  flex: 0 0 auto;
  padding: 0 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.install-tip-close {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
}

.install-tip-close:hover {
  color: var(--ink);
  background: #f3ece8;
}

@keyframes installTipIn {
  from {
    opacity: 0;
    transform: translate(-50%, 14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (display-mode: standalone) {
  .page {
    padding-top: calc(20px + env(safe-area-inset-top));
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
  }

  .install-tip {
    display: none !important;
  }
}

/* ------------------------------ 减弱动画 ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
