:root {
  color-scheme: light;
  font-family:
    "SF Pro Display", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui,
    sans-serif;
  color: #19233b;
  background: #f4f1e9;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #19233b;
  --ink-soft: #56617a;
  --muted: #8b93a6;
  --paper: #fffefa;
  --paper-warm: #faf7f0;
  --line: rgba(25, 35, 59, 0.09);
  --blue: #4f7cff;
  --violet: #8d6bff;
  --green: #26a27b;
  --orange: #f08a4b;
  --red: #e35d6a;
  --shadow: 0 18px 50px rgba(43, 50, 76, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f4f1e9;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(135deg, #f5f2ea 0%, #f0ede5 52%, #f6f2e9 100%);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(79, 124, 255, 0.25);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 1.22rem;
  letter-spacing: -0.025em;
}

.app-frame {
  width: min(1380px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.side-rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 24px 28px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(25, 35, 59, 0.06);
}

.brand-lockup,
.mobile-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup strong,
.mobile-brand strong {
  display: block;
  font-size: 1.06rem;
  letter-spacing: 0.04em;
}

.brand-lockup span,
.mobile-brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.69rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #fff;
  font-weight: 800;
  font-size: 1.15rem;
  background:
    radial-gradient(circle at 70% 22%, rgba(255, 255, 255, 0.4), transparent 25%),
    linear-gradient(145deg, #466ff0, #7b62ef);
  box-shadow: 0 12px 24px rgba(79, 124, 255, 0.24);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 1rem;
}

.side-nav {
  display: grid;
  gap: 7px;
  margin-top: 60px;
}

.nav-link {
  width: 100%;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 14px;
  color: #6c7488;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.55);
  transform: translateX(2px);
}

.nav-link.active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 12px 26px rgba(25, 35, 59, 0.16);
}

.side-tip {
  margin-top: auto;
  padding: 17px;
  border-radius: 18px;
  color: #637087;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.side-tip p {
  margin-top: 9px;
  font-size: 0.78rem;
  line-height: 1.65;
}

.main-shell {
  min-width: 0;
  padding: 0 42px 46px;
}

.top-bar {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.mobile-brand {
  display: none;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #6b7386;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 0.73rem;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2ab185;
  box-shadow: 0 0 0 4px rgba(42, 177, 133, 0.1);
}

.round-add {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 20px rgba(25, 35, 59, 0.16);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.round-add:hover {
  transform: translateY(-2px);
}

.round-add.small {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.page-content {
  width: min(1080px, 100%);
  margin: 0 auto;
}

.page-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  animation: page-in 0.4s ease both;
}

.page-stack > * {
  min-width: 0;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8b92a4;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.welcome-row,
.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.welcome-row {
  padding: 16px 2px 4px;
}

.welcome-row h1,
.page-intro h1 {
  margin-top: 7px;
}

.welcome-row p,
.page-intro p {
  margin-top: 10px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.streak-badge {
  min-width: 150px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  border-radius: 16px;
  color: #7d5a36;
  background: rgba(246, 187, 112, 0.2);
  border: 1px solid rgba(240, 138, 75, 0.18);
  font-size: 0.72rem;
}

.streak-badge strong {
  font-size: 1.15rem;
  color: #e57b34;
}

.hero-card {
  position: relative;
  min-height: 292px;
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 82% 24%, rgba(255, 180, 116, 0.22), transparent 28%),
    linear-gradient(128deg, #1c2945 0%, #26375c 58%, #3c3d70 100%);
  box-shadow: 0 28px 60px rgba(30, 42, 72, 0.2);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.hero-glow-one {
  width: 250px;
  height: 250px;
  right: -72px;
  top: -100px;
  background: rgba(126, 150, 255, 0.25);
}

.hero-glow-two {
  width: 170px;
  height: 170px;
  right: 22%;
  bottom: -120px;
  background: rgba(238, 146, 89, 0.2);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 530px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
}

.countdown-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 8px;
}

.countdown-line strong {
  font-size: clamp(4.3rem, 9vw, 7rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.countdown-line span {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}

.hero-copy > p {
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.84rem;
}

.phase-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.phase-chip {
  padding: 6px 10px;
  border-radius: 999px;
  color: #1e2b49;
  font-size: 0.68rem;
  font-weight: 750;
}

.phase-progress-text {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.7rem;
}

.phase-progress {
  width: min(310px, 80%);
  height: 5px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.phase-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.5s ease;
}

.progress-orbit {
  position: relative;
  z-index: 1;
  width: 166px;
  height: 166px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#f6a25f var(--progress), rgba(255, 255, 255, 0.12) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.progress-orbit::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: #263657;
}

.progress-orbit-inner {
  position: relative;
  z-index: 1;
  display: grid;
  text-align: center;
}

.progress-orbit-inner strong {
  font-size: 2.2rem;
  letter-spacing: -0.05em;
}

.progress-orbit-inner span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.metric-card {
  min-width: 0;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(43, 50, 76, 0.045);
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
}

.metric-icon.blue {
  color: #3e6cf3;
  background: #edf1ff;
}

.metric-icon.orange {
  color: #e5813f;
  background: #fff1e5;
}

.metric-icon.green {
  color: #1f9a75;
  background: #e8f7f1;
}

.metric-card strong,
.metric-card span {
  display: block;
}

.metric-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
  white-space: nowrap;
}

.metric-card div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.section-card,
.schedule-card,
.unscheduled-card,
.rules-card,
.upcoming-reviews,
.mini-timeline-card,
.settings-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 40px rgba(43, 50, 76, 0.045);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.section-heading.tight {
  align-items: center;
}

.section-heading h2 {
  margin-top: 5px;
}

.text-button,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  color: #5f6f91;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 650;
}

.text-button:hover,
.inline-link:hover {
  color: var(--blue);
}

.text-button.wide {
  width: 100%;
  justify-content: center;
  margin-top: 16px;
  padding: 11px;
  border-radius: 12px;
  background: #f4f5fa;
}

.plus-small {
  font-size: 1rem;
  line-height: 1;
}

.task-list {
  display: grid;
  margin-top: 18px;
}

.task-row {
  width: 100%;
  padding: 14px 4px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row.completed {
  opacity: 0.58;
}

.task-row.completed .task-title {
  text-decoration: line-through;
}

.task-check {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1.5px solid;
  border-radius: 7px;
  color: #fff;
  transition: transform 0.2s ease;
}

.task-row:hover .task-check {
  transform: scale(1.06);
}

.task-main {
  min-width: 0;
  flex: 1;
}

.task-title {
  display: block;
  overflow: hidden;
  color: #29334b;
  font-size: 0.88rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
}

.priority-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.priority-dot.high {
  background: var(--red);
}

.priority-dot.medium {
  background: var(--orange);
}

.priority-dot.low {
  background: #9aa2b5;
}

.section-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.67rem;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(220px, 0.8fr);
  gap: 13px;
}

.review-cta {
  min-height: 112px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 0;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(120deg, #375fce, #6557d7);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 16px 34px rgba(79, 96, 200, 0.16);
}

.review-cta-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.review-cta-copy {
  min-width: 0;
  flex: 1;
}

.review-cta .eyebrow {
  color: rgba(255, 255, 255, 0.55);
}

.review-cta strong,
.review-cta small {
  display: block;
}

.review-cta strong {
  margin-top: 6px;
  font-size: 0.96rem;
}

.review-cta small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.68rem;
}

.reminder-card {
  min-height: 112px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(240, 138, 75, 0.18);
  border-radius: var(--radius-lg);
  color: #9a5d30;
  background: rgba(255, 241, 228, 0.72);
  cursor: pointer;
  text-align: left;
}

.reminder-card span {
  min-width: 0;
}

.reminder-card strong,
.reminder-card small {
  display: block;
}

.reminder-card strong {
  font-size: 0.82rem;
}

.reminder-card small {
  margin-top: 5px;
  color: #a87b57;
  font-size: 0.65rem;
  line-height: 1.5;
}

.mini-timeline {
  display: grid;
  margin-top: 18px;
}

.mini-timeline-item {
  display: grid;
  grid-template-columns: 50px 3px minmax(0, 1fr);
  gap: 14px;
  min-height: 54px;
}

.timeline-time {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
}

.timeline-line {
  width: 3px;
  height: calc(100% - 8px);
  border-radius: 999px;
  opacity: 0.72;
}

.timeline-copy {
  padding-bottom: 17px;
}

.timeline-copy strong,
.timeline-copy small {
  display: block;
}

.timeline-copy strong {
  font-size: 0.82rem;
}

.timeline-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
}

.soft-label {
  padding: 6px 10px;
  border-radius: 999px;
  color: #7d8495;
  background: #f2f3f7;
  font-size: 0.66rem;
}

.reflection-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(25, 35, 59, 0.11);
}

.reflection-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #7956d8;
  background: #f0ebff;
}

.reflection-strip p {
  flex: 1;
  color: #687188;
  font-size: 0.72rem;
  line-height: 1.55;
}

.reflection-strip button {
  border: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 650;
}

.page-intro {
  padding: 26px 2px 6px;
}

.intro-actions,
.button-row,
.empty-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 13px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 680;
}

.primary-button {
  border: 0;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(25, 35, 59, 0.13);
}

.primary-button:hover {
  background: #24304e;
}

.secondary-button {
  border: 1px solid rgba(25, 35, 59, 0.1);
  color: #44506a;
  background: rgba(255, 255, 255, 0.74);
}

.secondary-button:hover {
  border-color: rgba(79, 124, 255, 0.24);
  color: var(--blue);
}

.danger-button {
  border: 1px solid rgba(227, 93, 106, 0.16);
  color: #bf4f5b;
  background: rgba(255, 238, 240, 0.74);
}

.full-width {
  width: 100%;
}

.date-strip-card {
  padding: 23px 24px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 40px rgba(43, 50, 76, 0.045);
}

.date-strip-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.date-strip-heading h2 {
  margin-top: 5px;
}

.strip-legend {
  display: flex;
  gap: 13px;
  color: var(--muted);
  font-size: 0.63rem;
}

.strip-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.task {
  background: var(--blue);
}

.legend-dot.event {
  background: var(--orange);
}

.date-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(62px, 1fr));
  gap: 8px;
  margin-top: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.date-strip::-webkit-scrollbar {
  display: none;
}

.date-chip {
  position: relative;
  min-height: 78px;
  padding: 10px 7px;
  display: grid;
  gap: 4px;
  border: 1px solid rgba(25, 35, 59, 0.07);
  border-radius: 15px;
  color: #697289;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  text-align: center;
}

.date-chip span,
.date-chip small {
  font-size: 0.61rem;
}

.date-chip strong {
  color: #29344d;
  font-size: 0.9rem;
}

.date-chip small {
  color: #9ba2b1;
}

.date-chip.selected {
  color: rgba(255, 255, 255, 0.7);
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 12px 22px rgba(25, 35, 59, 0.15);
}

.date-chip.selected strong {
  color: #fff;
}

.date-chip.selected small {
  color: rgba(255, 255, 255, 0.56);
}

.chip-task,
.chip-event {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.chip-task {
  background: var(--blue);
}

.chip-event {
  background: var(--orange);
}

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.72fr);
  gap: 15px;
  align-items: start;
}

.side-stack {
  display: grid;
  gap: 15px;
}

.timeline-board {
  display: grid;
  gap: 3px;
  margin-top: 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.timeline-time-block {
  padding-top: 15px;
  text-align: right;
}

.timeline-time-block strong,
.timeline-time-block span {
  display: block;
  font-variant-numeric: tabular-nums;
}

.timeline-time-block strong {
  font-size: 0.73rem;
}

.timeline-time-block span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.61rem;
}

.timeline-block {
  margin-bottom: 10px;
  padding: 15px 16px;
  border-left: 3px solid var(--blue);
  border-radius: 4px 15px 15px 4px;
  background: #f4f6fc;
}

.timeline-block.event {
  border-left-color: var(--orange);
  background: #fff5eb;
}

.timeline-block.completed {
  opacity: 0.52;
}

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

.timeline-block strong {
  font-size: 0.83rem;
}

.timeline-block > span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.65rem;
}

.mini-check {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(25, 35, 59, 0.17);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.mini-check.checked {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.empty-panel {
  min-height: 230px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 28px;
  border-radius: 17px;
  color: #8b93a4;
  background: rgba(247, 247, 250, 0.72);
  text-align: center;
}

.empty-panel.compact {
  min-height: 132px;
  padding: 18px;
}

.empty-panel h3 {
  color: #3f4a61;
  font-size: 0.9rem;
}

.empty-panel p {
  max-width: 320px;
  font-size: 0.72rem;
  line-height: 1.6;
}

.count-badge {
  min-width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #60708e;
  background: #eff1f6;
  font-size: 0.66rem;
  font-weight: 700;
}

.backlog-list {
  display: grid;
  margin-top: 13px;
}

.backlog-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.backlog-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.backlog-item > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.backlog-item strong,
.backlog-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.backlog-item strong {
  font-size: 0.72rem;
}

.backlog-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.61rem;
}

.tiny-remove {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  color: #a4aab8;
  background: transparent;
  cursor: pointer;
}

.tiny-remove:hover {
  color: var(--red);
  background: #fff0f1;
}

.rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: #7a8294;
  font-size: 0.69rem;
}

.rule-row strong {
  color: #3c465c;
  font-size: 0.69rem;
}

.rule-note,
.muted-copy {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.67rem;
  line-height: 1.65;
}

.review-intro .primary-button {
  min-width: 128px;
}

.review-stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.review-stats > div {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--line);
}

.review-stats > div:last-child {
  border-right: 0;
}

.review-stats span,
.review-stats strong {
  display: block;
}

.review-stats span {
  color: var(--muted);
  font-size: 0.67rem;
}

.review-stats strong {
  margin-top: 4px;
  font-size: 1.5rem;
}

.review-stat-main {
  background: rgba(244, 246, 255, 0.72);
}

.review-stat-icon {
  width: 42px;
  height: 42px;
  display: grid !important;
  place-items: center;
  border-radius: 14px;
  color: var(--blue);
  background: #eaf0ff;
}

.review-workspace {
  padding: 26px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 90% 6%, rgba(141, 107, 255, 0.09), transparent 27%),
    rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.review-card-topline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-subject-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.review-subject-pill > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.review-state {
  flex: 1;
  color: var(--muted);
  font-size: 0.66rem;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #788195;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.icon-button.subtle {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
}

.flashcard {
  min-height: 280px;
  margin-top: 20px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 24px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
    repeating-linear-gradient(0deg, transparent, transparent 29px, rgba(79, 124, 255, 0.05) 30px);
  border: 1px solid rgba(79, 124, 255, 0.1);
  box-shadow: 0 18px 45px rgba(48, 57, 87, 0.06);
  text-align: center;
}

.flashcard > h2 {
  max-width: 720px;
  margin: 18px auto 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.55;
}

.recall-prompt {
  display: grid;
  place-items: center;
  gap: 12px;
  margin-top: 42px;
  color: #a1a7b5;
}

.recall-prompt p {
  font-size: 0.73rem;
}

.answer-panel {
  max-width: 760px;
  margin: 28px auto 0;
  padding-top: 25px;
  border-top: 1px dashed rgba(25, 35, 59, 0.12);
  text-align: left;
}

.answer-panel p {
  margin-top: 11px;
  color: #4e5870;
  line-height: 1.8;
}

.reveal-button {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

.rating-area {
  margin-top: 16px;
}

.rating-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.rating-heading span {
  font-size: 0.78rem;
  font-weight: 700;
}

.rating-heading small {
  color: var(--muted);
  font-size: 0.64rem;
}

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

.rating-button {
  min-height: 68px;
  padding: 10px;
  display: grid;
  gap: 5px;
  border: 1px solid;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}

.rating-button strong {
  font-size: 0.76rem;
}

.rating-button span {
  font-size: 0.62rem;
  opacity: 0.7;
}

.rating-button.again {
  color: #c55360;
  border-color: rgba(227, 93, 106, 0.2);
  background: #fff3f4;
}

.rating-button.hard {
  color: #c27737;
  border-color: rgba(240, 138, 75, 0.22);
  background: #fff7ef;
}

.rating-button.good {
  color: #238662;
  border-color: rgba(38, 162, 123, 0.2);
  background: #effaf6;
}

.rating-button.easy {
  color: #496ed2;
  border-color: rgba(79, 124, 255, 0.2);
  background: #f1f5ff;
}

.review-footnote {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.63rem;
}

.review-empty-card {
  padding: 46px 24px;
  display: grid;
  place-items: center;
  gap: 10px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  text-align: center;
}

.celebrate-orbit {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 50%;
  color: #208862;
  background: #eaf8f2;
  box-shadow: 0 0 0 14px rgba(38, 162, 123, 0.05);
}

.review-empty-card h2 {
  font-size: 1.55rem;
}

.review-empty-card p {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.7;
}

.empty-actions {
  margin-top: 8px;
  justify-content: center;
}

.upcoming-list {
  display: grid;
  margin-top: 13px;
}

.upcoming-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.upcoming-row:last-child {
  border-bottom: 0;
}

.upcoming-date {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.65rem;
}

.upcoming-question {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-subject {
  font-size: 0.65rem;
  font-weight: 650;
}

.review-guide-card {
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(25, 35, 59, 0.11);
}

.guide-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #7758d7;
  background: #f1ecff;
}

.review-guide-card > div:nth-child(2) {
  flex: 1;
}

.review-guide-card strong {
  font-size: 0.76rem;
}

.review-guide-card p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.6;
}

.subject-overview {
  padding: 23px 25px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 190, 126, 0.23), transparent 25%),
    linear-gradient(120deg, #253456, #3b396b);
}

.overview-orb {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.13);
}

.subject-overview .eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.subject-overview strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
}

.subject-overview p {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.68rem;
}

.overview-note {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.66rem;
}

.subject-list {
  display: grid;
  gap: 12px;
}

.subject-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 34px rgba(43, 50, 76, 0.04);
}

.subject-card-head {
  width: 100%;
  padding: 19px 21px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.subject-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 800;
}

.subject-heading-copy {
  min-width: 0;
  flex: 1;
}

.subject-heading-copy strong,
.subject-heading-copy small {
  display: block;
}

.subject-heading-copy strong {
  font-size: 0.9rem;
}

.subject-heading-copy small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.65rem;
}

.subject-progress-copy {
  width: 110px;
  display: grid;
  gap: 6px;
  text-align: right;
}

.subject-progress-copy strong {
  font-size: 0.74rem;
}

.subject-progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #eceef3;
}

.subject-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.subject-card-body {
  padding: 0 21px 20px;
  border-top: 1px solid var(--line);
}

.topic-list {
  display: grid;
}

.topic-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.topic-status {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid;
  border-radius: 50%;
}

.topic-copy {
  min-width: 0;
  flex: 1;
}

.topic-copy strong,
.topic-copy small {
  display: block;
}

.topic-copy strong {
  font-size: 0.77rem;
}

.topic-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
}

.topic-range {
  width: min(270px, 100%);
  height: 4px;
  margin-top: 9px;
}

.inline-topic-form {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(100px, 0.7fr) auto;
  gap: 8px;
  margin-top: 14px;
}

.inline-topic-form input {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
}

.subject-card-body > .text-button {
  margin-top: 13px;
}

.settings-layout {
  display: grid;
  gap: 14px;
}

.settings-card {
  display: grid;
  gap: 14px;
}

.settings-card-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.settings-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
}

.settings-icon.blue {
  color: #426df0;
  background: #edf2ff;
}

.settings-icon.orange {
  color: #df7e3e;
  background: #fff1e6;
}

.settings-icon.green {
  color: #228d6c;
  background: #e9f8f2;
}

.settings-icon.violet {
  color: #785bd3;
  background: #f0ebff;
}

.settings-card-heading h2 {
  font-size: 1rem;
}

.settings-card-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.65rem;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #69738a;
  font-size: 0.67rem;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid rgba(25, 35, 59, 0.1);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  resize: vertical;
}

.field textarea {
  min-height: 95px;
  line-height: 1.6;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 11px 12px;
  border-radius: 11px;
  color: #727b8e;
  background: #f5f6f9;
  font-size: 0.66rem;
  line-height: 1.55;
}

.phase-list-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.phase-setting-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f7f7f9;
}

.phase-setting-row i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.phase-setting-row strong,
.phase-setting-row small {
  display: block;
}

.phase-setting-row strong {
  font-size: 0.7rem;
}

.phase-setting-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.58rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  font-size: 0.74rem;
}

.toggle-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
}

.toggle-row input {
  width: 42px;
  height: 24px;
  accent-color: var(--blue);
}

.data-source-preview {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 14px;
  border-radius: 13px;
  background: #f7f7f9;
}

.data-source-preview > div {
  min-width: 0;
  flex: 1;
}

.data-source-preview strong,
.data-source-preview span {
  display: block;
}

.data-source-preview strong {
  font-size: 0.72rem;
}

.data-source-preview > div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.61rem;
  line-height: 1.5;
}

.coming-soon {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  color: #8a6ccf;
  background: #eee9fb;
  font-size: 0.59rem;
}

.settings-save-bar {
  position: sticky;
  bottom: 16px;
  z-index: 5;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 17px;
  background: rgba(255, 254, 250, 0.9);
  box-shadow: 0 16px 38px rgba(34, 42, 64, 0.12);
  backdrop-filter: blur(16px);
}

.settings-save-bar span {
  color: var(--muted);
  font-size: 0.64rem;
}

.bottom-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(20, 28, 47, 0.38);
  backdrop-filter: blur(8px);
  animation: fade-in 0.2s ease both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal-card {
  width: min(560px, 100%);
  max-height: min(84vh, 780px);
  max-height: min(84dvh, 780px);
  overflow: auto;
  padding: 24px;
  border-radius: 24px;
  background: #fffefa;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.28);
  animation: modal-in 0.25s ease both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin-top: 5px;
  font-size: 1.35rem;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.color-picker {
  display: flex;
  gap: 10px;
  padding: 4px 0;
}

.color-dot {
  width: 29px;
  height: 29px;
  border: 3px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 1px rgba(25, 35, 59, 0.08);
}

.color-dot.selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--ink);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  min-width: min(360px, calc(100vw - 32px));
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 14px;
  color: #fff;
  background: #25324d;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.25);
  transform: translateX(-50%);
  animation: toast-in 0.25s ease both;
  font-size: 0.75rem;
}

.toast.error {
  background: #b94c58;
}

.toast.info {
  background: #4c628e;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
}

.loading-mark {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(145deg, #466ff0, #7b62ef);
  box-shadow: 0 20px 40px rgba(79, 124, 255, 0.24);
}

.loading-copy {
  display: grid;
  gap: 5px;
  text-align: center;
}

.loading-copy span {
  color: var(--muted);
  font-size: 0.72rem;
}

.loading-bar {
  width: 180px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(25, 35, 59, 0.08);
}

.loading-bar i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--violet));
  animation: loading 1.1s ease-in-out infinite;
}

@keyframes loading {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(330%);
  }
}

@media (max-width: 1000px) {
  .app-frame {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .side-rail {
    padding-inline: 18px;
  }

  .main-shell {
    padding-inline: 26px;
  }

  .progress-orbit {
    width: 140px;
    height: 140px;
  }

  .schedule-layout {
    grid-template-columns: 1fr;
  }

  .side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .app-frame {
    display: block;
    min-height: 100vh;
  }

  .side-rail {
    display: none;
  }

  .main-shell {
    padding: 0 14px calc(104px + env(safe-area-inset-bottom));
  }

  .top-bar {
    height: 74px;
    justify-content: space-between;
    padding-top: env(safe-area-inset-top);
  }

  .mobile-brand {
    display: flex;
  }

  .status-pill {
    display: none;
  }

  .page-content {
    width: 100%;
  }

  .page-stack {
    gap: 15px;
  }

  .welcome-row,
  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
    padding-top: 12px;
  }

  .welcome-row h1,
  .page-intro h1 {
    font-size: 1.95rem;
  }

  .welcome-row p,
  .page-intro p {
    margin-top: 7px;
    font-size: 0.78rem;
  }

  .streak-badge {
    min-width: 0;
    padding: 8px 11px;
  }

  .hero-card {
    min-height: 0;
    padding: 26px 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .countdown-line strong {
    font-size: 4.6rem;
  }

  .hero-copy > p {
    font-size: 0.73rem;
    line-height: 1.6;
  }

  .phase-row {
    margin-top: 22px;
  }

  .progress-orbit {
    position: absolute;
    right: 18px;
    bottom: 20px;
    width: 92px;
    height: 92px;
  }

  .progress-orbit::after {
    inset: 6px;
  }

  .progress-orbit-inner strong {
    font-size: 1.38rem;
  }

  .progress-orbit-inner span {
    font-size: 0.56rem;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    min-height: 92px;
    padding: 12px 10px;
    align-items: flex-start;
    flex-direction: column;
    gap: 9px;
  }

  .metric-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .metric-card strong {
    font-size: 0.86rem;
  }

  .metric-card div > span {
    font-size: 0.6rem;
  }

  .section-card,
  .schedule-card,
  .unscheduled-card,
  .rules-card,
  .upcoming-reviews,
  .mini-timeline-card,
  .settings-card {
    padding: 19px;
    border-radius: 20px;
  }

  .section-heading h2 {
    font-size: 1.08rem;
  }

  .task-title {
    font-size: 0.82rem;
  }

  .section-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .split-grid {
    grid-template-columns: 1fr;
  }

  .review-cta,
  .reminder-card {
    min-height: 96px;
  }

  .reflection-strip {
    align-items: flex-start;
  }

  .reflection-strip button {
    display: none;
  }

  .intro-actions {
    width: 100%;
  }

  .intro-actions > button {
    flex: 1;
  }

  .date-strip-card {
    padding: 19px 18px;
    border-radius: 20px;
  }

  .date-strip-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .strip-legend {
    display: none;
  }

  .date-strip {
    grid-template-columns: repeat(10, 64px);
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .schedule-layout,
  .side-stack {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
  }

  .timeline-block {
    padding: 13px;
  }

  .review-stats {
    grid-template-columns: 1.2fr 0.8fr 0.8fr;
  }

  .review-stats > div {
    padding: 15px 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .review-stat-icon {
    width: 32px;
    height: 32px;
  }

  .review-stats strong {
    font-size: 1.15rem;
  }

  .review-workspace {
    padding: 18px;
    border-radius: 22px;
  }

  .review-card-topline {
    flex-wrap: wrap;
  }

  .review-state {
    order: 4;
    flex-basis: 100%;
  }

  .flashcard {
    min-height: 260px;
    padding: 26px 20px;
    border-radius: 19px;
  }

  .flashcard > h2 {
    font-size: 1.3rem;
  }

  .rating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rating-button {
    min-height: 62px;
  }

  .rating-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .upcoming-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .upcoming-subject {
    display: none;
  }

  .review-guide-card {
    align-items: flex-start;
  }

  .review-guide-card > svg {
    display: none;
  }

  .subject-overview {
    align-items: flex-start;
    padding: 19px;
  }

  .overview-note {
    display: none;
  }

  .subject-card-head {
    padding: 16px;
    gap: 10px;
  }

  .subject-progress-copy {
    width: 75px;
  }

  .subject-card-body {
    padding-inline: 16px;
  }

  .inline-topic-form {
    grid-template-columns: 1fr 1fr auto;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .phase-list-settings {
    grid-template-columns: 1fr;
  }

  .settings-save-bar {
    bottom: 82px;
  }

  .settings-save-bar > span {
    display: none;
  }

  .settings-save-bar .primary-button {
    width: 100%;
  }

  .bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 50;
    height: 65px;
    padding: 6px 7px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 21px;
    background: rgba(255, 254, 250, 0.91);
    box-shadow: 0 16px 45px rgba(25, 35, 59, 0.16);
    backdrop-filter: blur(18px);
  }

  .bottom-nav-item {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    border: 0;
    border-radius: 15px;
    color: #8b93a5;
    background: transparent;
    cursor: pointer;
  }

  .bottom-nav-item span {
    font-size: 0.57rem;
  }

  .bottom-nav-item.active {
    color: var(--ink);
    background: #f1f2f6;
  }

  .toast {
    bottom: 88px;
  }

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

  .modal-card {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    border-radius: 25px 25px 0 0;
  }
}

@media (max-width: 420px) {
  .countdown-line strong {
    font-size: 4rem;
  }

  .progress-orbit {
    width: 82px;
    height: 82px;
  }

  .hero-copy {
    padding-right: 55px;
  }

  .metric-card {
    min-width: 0;
  }

  .review-cta {
    padding: 18px;
  }

  .review-cta-icon {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.plan-view-switch {
  width: fit-content;
  margin-top: 14px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  border-radius: 14px;
  background: #eceff5;
}

.plan-view-switch button {
  min-height: 34px;
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  color: #7b8498;
  background: transparent;
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 680;
}

.plan-view-switch button.active {
  color: #fff;
  background: var(--ink);
  box-shadow: 0 6px 14px rgba(25, 35, 59, 0.13);
}

.import-summary-card {
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(38, 162, 123, 0.16);
  border-radius: 18px;
  background: rgba(237, 250, 245, 0.78);
}

.import-summary-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  color: #228d6c;
  background: #dff6ec;
}

.import-summary-card > div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.import-summary-card strong {
  display: block;
  color: #27755d;
  font-size: 0.76rem;
}

.import-summary-card p {
  margin-top: 4px;
  overflow: hidden;
  color: #668c7d;
  font-size: 0.64rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.danger-text {
  color: #bc5360 !important;
}

.timetable-toolbar-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 34px rgba(43, 50, 76, 0.045);
}

.week-navigation {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.week-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #68728a;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.week-arrow:first-child svg {
  transform: rotate(180deg);
}

.week-heading {
  min-width: 0;
}

.week-heading h2 {
  margin-top: 4px;
  font-size: 1.05rem;
}

.week-heading small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
}

.week-today-button {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(79, 124, 255, 0.14);
  border-radius: 10px;
  color: var(--blue);
  background: #f0f4ff;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 680;
}

.course-legend {
  padding: 11px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
}

.course-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #737c8e;
  font-size: 0.62rem;
}

.course-legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.timetable-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 42px rgba(43, 50, 76, 0.05);
}

.timetable-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.week-grid {
  min-width: 940px;
}

.week-header {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: rgba(250, 250, 252, 0.82);
}

.time-corner {
  display: grid;
  place-items: center;
  color: #a0a6b4;
  font-size: 0.6rem;
}

.week-day-head {
  min-height: 72px;
  padding: 10px 6px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.week-day-head span,
.week-day-head small {
  color: #8c94a5;
  font-size: 0.61rem;
}

.week-day-head strong {
  color: #34405a;
  font-size: 1.05rem;
}

.week-day-head.today {
  color: #fff;
  background: var(--ink);
}

.week-day-head.today span,
.week-day-head.today small,
.week-day-head.today strong {
  color: #fff;
}

.week-body {
  display: grid;
  grid-template-columns: 58px repeat(7, minmax(0, 1fr));
}

.time-axis {
  position: relative;
  border-right: 1px solid var(--line);
  background: rgba(250, 250, 252, 0.62);
}

.time-tick {
  position: absolute;
  right: 7px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: #a0a6b4;
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  transform: translateY(-50%);
  white-space: nowrap;
}

.time-tick strong {
  min-width: 12px;
  color: #5d667a;
  font-size: 0.68rem;
  text-align: right;
}

.tick-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c7ccd6;
}

.week-day-column {
  position: relative;
  border-left: 1px solid rgba(25, 35, 59, 0.055);
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 43px,
    rgba(25, 35, 59, 0.055) 44px
  );
}

.week-day-column.today {
  background-color: rgba(79, 124, 255, 0.035);
}

.course-block {
  position: absolute;
  z-index: 2;
  min-height: 30px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 8px 16px rgba(49, 59, 91, 0.12);
  cursor: default;
}

.course-block-time {
  overflow: hidden;
  opacity: 0.78;
  font-size: 0.52rem;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-block strong,
.study-task-block strong {
  overflow: hidden;
  display: -webkit-box;
  font-size: 0.65rem;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.course-block-location {
  overflow: hidden;
  opacity: 0.82;
  font-size: 0.54rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.study-task-block {
  position: absolute;
  z-index: 3;
  min-height: 30px;
  padding: 7px 24px 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  border: 1.5px dashed rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(49, 59, 91, 0.15);
  cursor: grab;
  touch-action: none;
}

.study-task-block:active {
  cursor: grabbing;
}

.study-task-block.completed {
  opacity: 0.46;
  filter: saturate(0.55);
}

.study-task-block.dragging {
  opacity: 0.3;
}

.task-drag-grip {
  position: absolute;
  top: 4px;
  right: 5px;
  opacity: 0.65;
}

.task-block-check {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 5px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.task-drag-ghost {
  position: fixed;
  z-index: 999;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  color: #fff;
  background: #253552;
  box-shadow: 0 18px 38px rgba(21, 30, 50, 0.28);
  pointer-events: none;
  transform: rotate(2deg);
}

.task-drag-ghost > div {
  min-width: 0;
}

.task-drag-ghost strong,
.task-drag-ghost small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-drag-ghost strong {
  font-size: 0.72rem;
}

.task-drag-ghost small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.58rem;
}

.week-day-column.drop-target {
  background-color: rgba(79, 124, 255, 0.1);
  outline: 2px dashed rgba(79, 124, 255, 0.38);
  outline-offset: -2px;
}

body.task-dragging {
  cursor: grabbing;
  user-select: none;
}

.timetable-backlog-card {
  padding: 15px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.task-chip-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.task-chip {
  min-width: 176px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(25, 35, 59, 0.08);
  border-radius: 12px;
  color: #3c4862;
  background: rgba(255, 255, 255, 0.82);
  cursor: grab;
  touch-action: none;
}

.task-chip:active {
  cursor: grabbing;
}

.task-chip > span:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.task-chip strong,
.task-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-chip strong {
  font-size: 0.69rem;
}

.task-chip small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.59rem;
}

.task-chip-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 3px;
  background: var(--task-color);
}

.timetable-empty {
  padding: 34px 20px 38px;
  display: grid;
  place-items: center;
  gap: 9px;
  color: #8b93a4;
  text-align: center;
}

.timetable-empty > div:first-child {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #6d79a0;
  background: #eef1f8;
}

.timetable-empty h3 {
  color: #44506a;
  font-size: 0.92rem;
}

.timetable-empty p {
  max-width: 480px;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.65;
}

@media (max-width: 760px) {
  .plan-view-switch {
    width: 100%;
  }

  .plan-view-switch button {
    flex: 1;
    justify-content: center;
  }

  .import-summary-card {
    align-items: flex-start;
    padding: 14px;
  }

  .import-summary-card p {
    white-space: normal;
  }

  .import-summary-actions {
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
  }

  .timetable-toolbar-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .week-navigation {
    width: 100%;
  }

  .week-heading {
    flex: 1;
  }

  .week-today-button {
    width: 100%;
  }

  .week-grid {
    min-width: 840px;
  }

  .course-legend {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .course-legend-item {
    flex: 0 0 auto;
  }

  .timetable-backlog-card {
    padding: 14px;
  }

  .task-chip {
    min-width: 190px;
  }
}

.backend-unavailable {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid rgba(240, 138, 75, 0.18);
  border-radius: 18px;
  color: #8b633f;
  background: #fff8ef;
}

.backend-unavailable > div {
  min-width: 0;
}

.backend-unavailable strong {
  display: block;
  font-size: 0.78rem;
}

.backend-unavailable p {
  margin-top: 5px;
  color: #9d7b5b;
  font-size: 0.67rem;
  line-height: 1.6;
}

.backend-unavailable small {
  display: block;
  margin-top: 7px;
  color: #a08a75;
  font-size: 0.6rem;
}

.backend-unavailable code {
  padding: 2px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.58rem;
}

.materials-loading {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 14px;
  color: #64718a;
  background: rgba(255, 255, 255, 0.6);
  font-size: 0.7rem;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: pulse-dot 1s ease-in-out infinite;
}

@keyframes pulse-dot {
  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

.source-add-card,
.source-list-card,
.materials-list-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(43, 50, 76, 0.045);
}

.source-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.5fr) 140px minmax(150px, 0.9fr) auto;
  gap: 9px;
  align-items: end;
  margin-top: 17px;
}

.source-form .field {
  min-width: 0;
}

.source-form .wide-field {
  min-width: 0;
}

.source-form .primary-button {
  min-height: 43px;
  white-space: nowrap;
}

.source-policy {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.6;
}

.source-list {
  display: grid;
  margin-top: 14px;
}

.source-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.source-card:last-child {
  border-bottom: 0;
}

.source-card-main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.source-type {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  color: #6478b2;
  background: #edf1ff;
  font-size: 0.55rem;
}

.source-card-main > div {
  min-width: 0;
}

.source-card-main strong {
  display: block;
  overflow: hidden;
  color: #3d4861;
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card-main p {
  max-width: 680px;
  margin-top: 4px;
  overflow: hidden;
  color: #8a92a3;
  font-size: 0.59rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-card-main small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #a0a7b5;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.material-list {
  display: grid;
  margin-top: 14px;
}

.material-item {
  min-width: 0;
  padding: 12px 3px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

.material-item:last-child {
  border-bottom: 0;
}

.material-item:hover .material-copy strong {
  color: var(--blue);
}

.material-type {
  flex: 0 0 auto;
  min-width: 38px;
  padding: 4px 5px;
  border-radius: 6px;
  color: #7e8497;
  background: #f1f2f6;
  font-size: 0.54rem;
  text-align: center;
}

.material-type.pdf {
  color: #bd5967;
  background: #fff0f2;
}

.material-copy {
  min-width: 0;
  flex: 1;
}

.material-copy strong {
  display: block;
  overflow: hidden;
  color: #44506a;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-copy small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-item > svg {
  flex: 0 0 auto;
  color: #9ba2b1;
}

.sync-code-box {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 12px;
  background: #f6f7fb;
}

.sync-code-box > div {
  min-width: 0;
  flex: 1;
}

.sync-code-box span,
.sync-code-box small {
  display: block;
  color: var(--muted);
  font-size: 0.58rem;
}

.sync-code-box input {
  width: 100%;
  margin: 4px 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #55617a;
  background: #fff;
  font-size: 0.62rem;
}

.sync-empty {
  padding: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 12px;
  background: #f6f7fb;
}

.sync-empty p {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.55;
}

.sync-connect-form {
  display: flex;
  gap: 8px;
}

.sync-connect-form input {
  min-width: 0;
  flex: 1;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
  font-size: 0.66rem;
}

@media (max-width: 760px) {
  .source-add-card,
  .source-list-card,
  .materials-list-card {
    padding: 18px;
    border-radius: 20px;
  }

  .source-form {
    grid-template-columns: 1fr 1fr;
  }

  .source-form .wide-field {
    grid-column: 1 / -1;
  }

  .source-form .primary-button {
    grid-column: 1 / -1;
  }

  .source-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-actions {
    align-self: flex-end;
  }

  .source-card-main strong,
  .source-card-main p,
  .source-card-main small {
    max-width: calc(100vw - 112px);
  }

  .material-item {
    gap: 8px;
  }

  .sync-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .sync-empty .primary-button {
    width: 100%;
  }
}
.catalog-list-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(43, 50, 76, 0.045);
}

.catalog-list {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.catalog-row {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-radius: 10px;
  background: #f7f7fa;
}

.catalog-source {
  color: #7180a8;
  font-size: 0.58rem;
}

.catalog-row strong {
  overflow: hidden;
  color: #4a566e;
  font-size: 0.66rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-row small {
  color: #a0a7b5;
  font-size: 0.56rem;
}

@media (max-width: 760px) {
  .catalog-list-card {
    padding: 18px;
    border-radius: 20px;
  }

  .catalog-row {
    grid-template-columns: 1fr auto;
  }

  .catalog-source {
    grid-column: 1 / -1;
  }
}

.source-school {
  flex: 0 0 auto;
  padding: 4px 6px;
  border-radius: 6px;
  color: #6f5ab6;
  background: #f0ecff;
  font-size: 0.55rem;
}

.source-discovery-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 40px rgba(43, 50, 76, 0.045);
}

.discovery-form {
  grid-template-columns: minmax(180px, 1fr) 220px auto;
  margin-top: 16px;
}

.discovery-results {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}

.discovery-item {
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 11px;
  background: #f7f7fa;
}

.discovery-copy {
  min-width: 0;
  flex: 1;
}

.discovery-copy strong,
.discovery-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.discovery-copy strong {
  color: #4b566e;
  font-size: 0.7rem;
}

.discovery-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.57rem;
}

.discovery-item .secondary-button {
  min-height: 32px;
  padding: 7px 10px;
}

.materials-summary-card {
  padding: 17px 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-radius: 18px;
  background: linear-gradient(120deg, #253456, #3b396b);
  color: #fff;
}

.materials-summary-card div {
  display: grid;
  gap: 4px;
}

.materials-summary-card span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.62rem;
}

.materials-summary-card strong {
  font-size: 1.4rem;
}

.materials-summary-card p {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.61rem;
  line-height: 1.5;
}

@media (max-width: 760px) {
  .source-discovery-card {
    padding: 18px;
    border-radius: 20px;
  }

  .discovery-form {
    grid-template-columns: 1fr;
  }

  .discovery-form .primary-button {
    width: 100%;
  }

  .discovery-item {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .discovery-item .secondary-button {
    margin-left: auto;
  }

  .materials-summary-card {
    padding: 15px;
  }
}

.study-target-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid rgba(79, 124, 255, 0.14);
  border-radius: 17px;
  background: rgba(240, 244, 255, 0.72);
}

.study-target-card strong {
  display: block;
  margin-top: 4px;
  color: #35415a;
  font-size: 0.8rem;
}

.study-target-card p {
  margin-top: 5px;
  color: #6f7b95;
  font-size: 0.64rem;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .study-target-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .study-target-card .secondary-button {
    width: 100%;
  }
}

.exam-guide-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.92);
}

.exam-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.exam-guide-grid > div {
  padding: 12px;
  border-radius: 12px;
  background: #f7f7fa;
}

.exam-guide-grid strong {
  display: block;
  color: #48546c;
  font-size: 0.7rem;
}

.exam-guide-grid p {
  margin-top: 6px;
  color: #7c8598;
  font-size: 0.62rem;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .exam-guide-card {
    padding: 18px;
  }

  .exam-guide-grid {
    grid-template-columns: 1fr;
  }
}

/* 研途：院校 / 专业 / 方向 级联选择器 */
.target-cascade {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.target-cascade .field {
  margin-bottom: 0;
}
.target-cascade select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b5b46' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  border: 1px solid #e4dccb;
  border-radius: 12px;
  padding: 12px 38px 12px 14px;
  font-size: 15px;
  color: #2c241a;
}
.target-subjects {
  margin-top: 4px;
  padding: 14px;
  background: #faf6ee;
  border: 1px solid #e9e0cf;
  border-radius: 14px;
}
.exam-subject-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.exam-subject-chip {
  background: #e9eefc;
  color: #2f5bd0;
  border: 1px solid #c9d8f7;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
}
.target-direction-detail {
  margin-top: 10px;
}
.target-direction-detail strong {
  display: block;
  margin-bottom: 4px;
  color: #2c241a;
}
.target-direction-detail p {
  font-size: 13px;
  line-height: 1.5;
  color: #6b5b46;
  margin: 0 0 6px;
}
.target-direction-detail small {
  display: block;
  color: #8a7a64;
  font-size: 12px;
  margin-top: 2px;
}
.target-admission {
  margin-top: 10px;
  font-size: 13px;
  color: #1f7a52;
  background: #e8f6ee;
  border: 1px solid #cdecd8;
  border-radius: 10px;
  padding: 8px 10px;
}
.target-cascade .secondary-button {
  align-self: flex-start;
}
