.gc-nav-jump {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.td-app {
  --lr-red: #C93632;
  --lr-red-deep: #A92B28;
  --lr-bg: #F6F1E6;
  --lr-surface: #FFFCF6;
  --lr-coral: #F4DDD7;
  --lr-blush: #F8EBE6;
  --lr-beige: #E8DFCF;
  --lr-sand: #E8DFCF;
  --lr-text: #302924;
  --lr-muted: #81766C;
  --lr-line: #E4D9C8;
  --lr-green: #5F7A5A;
  --lr-sage: #DDE5D5;
  --lr-lavender: #E8DFCF;
  --lr-radius: 14px;
  --lr-radius-sm: 10px;
  color: var(--lr-text);
}

.td-home,
.td-cal,
.td-work {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: none;
  width: 100%;
}

.td-kicker {
  margin: 0;
  color: var(--lr-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.td-hero h2,
.td-cal h2,
.td-work h2 {
  margin: 0.15rem 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.35;
}

.td-hero p,
.td-hint,
.td-empty {
  margin: 0;
  color: var(--lr-muted);
  line-height: 1.6;
}

.td-stats,
.td-home-grid,
.td-home-layout,
.td-home-bottom,
.td-actions,
.td-quick,
.td-after,
.td-students {
  display: grid;
  gap: 0.85rem;
}

.td-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.td-home-grid { grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); }
.td-home-layout {
  grid-template-columns: minmax(0, 1fr) minmax(15.5rem, 18.5rem);
  gap: clamp(0.85rem, 1.6vw, 1.35rem);
  align-items: start;
  width: 100%;
}

@media (min-width: 1400px) {
  .td-home-layout {
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 19rem);
  }
}
.td-home-main,
.td-home-rail,
.td-side {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  min-width: 0;
}
.td-home-rail {
  max-width: 19rem;
}
.td-home-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

.td-stat,
.td-panel,
.td-class,
.td-task,
.td-agenda-card,
.td-student,
.td-task-card,
.td-preview {
  border: 1px solid var(--lr-line);
  border-radius: var(--lr-radius);
  background: var(--lr-surface);
  box-shadow: none;
}

.td-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  row-gap: 0.1rem;
  align-items: center;
  min-height: 0;
  padding: 0.9rem 1rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}
.td-stat.is-classes { background: #F7E4E0; border-color: #E8C8C0; }
.td-stat.is-attend { background: #F3EBDD; border-color: #E2D5C0; }
.td-stat.is-booked { background: var(--lr-sage); border-color: #C9D4C0; }
.td-stat-ico {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.75);
  color: var(--lr-red-deep);
}
.td-stat-ico svg { width: 1.15rem; height: 1.15rem; }
.td-stat strong {
  grid-column: 2;
  font-size: 1.55rem;
  line-height: 1.1;
  color: var(--lr-text);
}
.td-stat > span:last-child {
  grid-column: 2;
  color: var(--lr-muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.td-stat:hover,
.td-class:hover,
.td-task:hover,
.td-agenda-card:hover {
  border-color: #D8C4B0;
  transform: translateY(-1px);
}

.td-panel { padding: 1rem 1.05rem; }
.td-panel h3,
.td-work h3 {
  margin: 0.1rem 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 800;
}
.td-panel-head,
header.td-cal-bar,
header.td-form-head,
header.td-work-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  background: transparent;
  color: var(--lr-text);
  box-shadow: none;
  padding: 0;
}
header.td-work-head {
  flex-direction: column;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(59, 48, 45, 0.06);
}
header.td-work-head h2,
header.td-work-head p,
header.td-cal-bar h2,
header.td-form-head h2 { color: var(--lr-text); }

.td-class,
.td-task,
.td-agenda-card,
.td-student {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.td-class + .td-class,
.td-task + .td-task { margin-top: 0.5rem; }
.td-class-time { font-weight: 800; color: var(--lr-red); font-size: 0.9rem; }
.td-class small,
.td-task small,
.td-agenda-card small,
.td-student small { display: block; color: var(--lr-muted); font-size: 0.78rem; }
.td-class-go { color: var(--lr-red); font-weight: 800; font-size: 0.8rem; white-space: nowrap; }

.td-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--lr-beige);
  font-size: 0.72rem;
  font-weight: 800;
}
.td-pill.is-live { background: var(--lr-coral); }
.td-pill.is-done { background: var(--lr-sage); }
.td-pill.is-draft { background: var(--lr-beige); }

.td-tasks,
.td-quick,
.td-actions,
.td-after { display: grid; gap: 0.5rem; }
.td-quick-btn,
.td-primary,
.td-text,
.td-icon,
.td-danger,
.td-tab,
.td-switch button {
  min-height: 40px;
  border: 0;
  border-radius: var(--lr-radius-sm);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.td-primary { padding: 0 1rem; background: var(--lr-red); color: white; }
.td-text {
  padding: 0 0.35rem;
  min-height: 0;
  background: transparent;
  color: var(--lr-red);
  font-size: 0.82rem;
}
.td-quick-btn {
  padding: 0 0.9rem;
  background: var(--lr-blush);
  color: var(--lr-text);
  border: 1px solid var(--lr-line);
}
.td-quick-btn.is-primary {
  background: var(--lr-red);
  border-color: var(--lr-red);
  color: #fff;
}
.td-danger { padding: 0 0.9rem; background: transparent; color: var(--lr-red); }
.td-icon {
  width: 2rem;
  min-height: 2rem;
  padding: 0;
  background: var(--lr-surface);
  color: var(--lr-text);
  border: 1px solid var(--lr-line);
}

.td-empty-block {
  display: grid;
  place-items: center;
  gap: 0.45rem;
  padding: 1.25rem 0.75rem;
  text-align: center;
}
.td-empty-block.is-ok {
  background: var(--lr-sage);
  border-radius: var(--lr-radius-sm);
  padding: 0.9rem;
}
.td-empty-ico {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: var(--lr-coral);
  color: var(--lr-red-deep);
}
.td-empty-ico svg { width: 1.15rem; height: 1.15rem; }
.td-empty-compact { padding: 0.55rem 0.15rem; font-size: 0.88rem; }

.td-home-cal-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.td-home-cal-nav strong {
  min-width: 6.5rem;
  text-align: center;
  font-size: 0.88rem;
}
.td-home-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
  margin-top: 0.35rem;
}
.td-home-cal-dow {
  text-align: center;
  color: var(--lr-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0;
}
.td-home-cal-day {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 2.1rem);
  height: 2.1rem;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--lr-text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.td-home-cal-day.is-out { opacity: 0.35; }
.td-home-cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--lr-red); }
.td-home-cal-day.is-on {
  background: var(--lr-red);
  color: #fff;
  box-shadow: none;
}
.td-home-cal-day.has-class i {
  position: absolute;
  bottom: 0.18rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--lr-red);
}
.td-home-cal-day.is-on.has-class i { background: #fff; }
.td-home-cal-link {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  min-height: 2.4rem;
  border: 0;
  border-radius: var(--lr-radius-sm);
  background: var(--lr-coral);
  color: var(--lr-red-deep);
  font: inherit;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
}
.td-home-upcoming-date {
  color: var(--lr-muted);
  font-size: 0.78rem;
  font-weight: 700;
}
.td-home-upcoming-list { display: grid; gap: 0.5rem; }
.td-home-upcoming .td-agenda-card {
  grid-template-columns: 1fr;
  margin: 0;
  gap: 0.2rem;
}
.td-home-upcoming .td-agenda-card em {
  font-style: normal;
  color: var(--lr-red);
  font-weight: 800;
  font-size: 0.82rem;
}

.td-cal-tools,
.td-switch,
.td-form-actions,
.td-work-meta,
.td-block-add { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.td-switch { padding: 0.2rem; border-radius: 999px; background: var(--lr-beige); }
.td-switch button { min-height: 36px; padding: 0 0.8rem; background: transparent; color: var(--lr-muted); }
.td-switch button.is-on { background: white; color: var(--lr-red); }

.td-search input,
.td-form input,
.td-form select,
.td-form textarea {
  width: 100%;
  min-height: 44px;
  margin-top: 0.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--lr-line);
  border-radius: 14px;
  background: white;
  color: var(--lr-text);
  font: inherit;
}
.td-form input[type="checkbox"] { width: 22px; min-height: 22px; margin: 0; }
.td-allday { white-space: nowrap; }
.td-search { display: block; }

.td-week { display: block; }
.td-agenda { display: none; }
.td-cal.is-month .td-agenda { display: block; margin-top: 0.9rem; }
.td-agenda-date { margin: 0 0 0.55rem; font-weight: 800; }
@media (min-width: 981px) {
  .td-cal.is-month .td-strip { display: none; }
}
.td-week-head,
.td-week-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.td-week-body { max-height: min(640px, calc(100dvh - 280px)); overflow: auto; }
.td-week-head span,
.td-dayhead { min-height: 52px; border: 0; background: transparent; font: inherit; font-weight: 800; }
.td-dayhead.is-today strong { color: var(--lr-red); }
.td-hours span { height: var(--hour); }
.td-col { height: calc(var(--hour) * 13); }
.td-hours span { display: flex; align-items: flex-start; color: var(--lr-muted); font-size: 0.75rem; }
.td-col { position: relative; border-left: 1px solid var(--lr-line); background: linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--lr-line) calc(var(--hour) - 1px)); background-size: 100% var(--hour); }
.td-col.is-today { background-color: #fffdfb; }
.td-slot { position: relative; z-index: 1; display: block; width: 100%; height: var(--hour); border: 0; background: transparent; cursor: pointer; }
.td-slot:hover { background: rgba(240, 68, 56, 0.06); }
.td-event,
.td-busy {
  position: absolute;
  z-index: 2;
  overflow: hidden;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 12px;
  color: var(--lr-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.td-event { background: var(--lr-blush); box-shadow: 0 6px 16px rgba(240, 68, 56, 0.12); }
.td-event.is-roblox { background: var(--lr-lavender); }
.td-event.is-done { opacity: 0.72; }
.td-event strong,
.td-event small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-event small { color: var(--lr-muted); }
.td-busy { right: 4px; left: 4px; z-index: 1; background: repeating-linear-gradient(-45deg, var(--lr-beige), var(--lr-beige) 6px, #fbf7f2 6px, #fbf7f2 12px); color: var(--lr-muted); font-size: 0.72rem; pointer-events: none; }
.td-now { position: absolute; right: 0; left: 0; z-index: 3; height: 2px; background: var(--lr-red); pointer-events: none; }
.td-now::before { content: ""; position: absolute; top: -4px; left: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--lr-red); }

.td-month-head,
.td-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.td-month-head span { color: var(--lr-muted); font-size: 0.78rem; font-weight: 800; text-align: center; }
.td-cell { min-height: 108px; padding: 0.35rem; border-radius: 16px; background: white; }
.td-cell.is-out { opacity: 0.45; }
.td-cell.is-today { box-shadow: inset 0 0 0 2px var(--lr-coral); }
.td-cell-day,
.td-chip,
.td-more { display: block; width: 100%; border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.td-cell-day { font-weight: 800; }
.td-chip { margin-top: 0.25rem; padding: 0.2rem 0.4rem; border-radius: 8px; background: var(--lr-blush); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.td-more { color: var(--lr-red); font-weight: 800; }

.td-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.35rem; }
.td-strip-day { position: relative; min-height: 64px; border: 0; border-radius: 16px; background: white; font: inherit; cursor: pointer; }
.td-strip-day.is-on { background: var(--lr-red); color: white; }
.td-strip-day i { position: absolute; right: 8px; bottom: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--lr-red); font-size: 0; }
.td-strip-day.is-on i { background: white; }
.td-agenda-card { grid-template-columns: 1fr; margin-top: 0.7rem; }
.td-agenda-card em { font-style: normal; color: var(--lr-red); font-weight: 800; }

.td-tabs { display: flex; gap: 0.4rem; }
.td-tab { padding: 0 1rem; background: white; color: var(--lr-muted); }
.td-tab.is-on { background: var(--lr-text); color: white; }
.td-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem 1rem; margin: 0 0 1rem; }
.td-facts div { margin: 0; }
.td-facts dt { color: var(--lr-muted); font-size: 0.78rem; }
.td-facts dd { margin: 0.15rem 0 0; font-weight: 800; }
.td-checks { display: grid; gap: 0.45rem; margin-bottom: 0.8rem; }
.td-checks label,
.td-allday,
.td-hour-row { display: flex; gap: 0.55rem; align-items: center; min-height: 44px; }
.td-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--lr-coral); font-weight: 800; }
.td-task-card { display: flex; justify-content: space-between; gap: 0.7rem; align-items: center; padding: 0.9rem 1rem; }
.td-task-card button { min-height: 44px; border: 0; border-radius: 999px; background: var(--lr-blush); font: inherit; font-weight: 800; cursor: pointer; }

.td-sheet { width: min(640px, calc(100vw - 1.5rem)); border: 0; border-radius: 24px; background: var(--lr-bg); color: var(--lr-text); }
.td-sheet::backdrop { background: rgba(59, 48, 45, 0.35); }
.td-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; padding: 1rem; }
.td-form-head,
.td-span,
.td-preview,
.td-hint,
.td-form-actions,
.td-hour-list,
.td-block-add,
.td-block-list { grid-column: 1 / -1; }
.td-preview { padding: 0.9rem 1rem; }
.td-note { margin: 0; color: var(--lr-red); }
.td-note.is-ok { color: var(--lr-green); }
.td-warn { color: var(--lr-red); }
.td-skel { display: grid; gap: 0.7rem; }
.td-skel span { display: block; height: 84px; border-radius: 22px; background: linear-gradient(90deg, #fff, var(--lr-beige), #fff); background-size: 200% 100%; animation: td-shimmer 1.1s ease infinite; }
@keyframes td-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.td-return { display: flex; justify-content: space-between; gap: 0.7rem; align-items: center; margin: 0 0 0.8rem; padding: 0.7rem 0.9rem; border-radius: 16px; background: var(--lr-blush); }
.td-hw-context { margin: 0 0 0.8rem; padding: 0.85rem 1rem; border-radius: 18px; background: var(--lr-blush); }

@media (max-width: 720px) {
  .td-class,
  .td-task { grid-template-columns: 1fr; }
  .td-pill,
  .td-class-go { justify-self: start; }
  .td-form { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .td-home-grid,
  .td-home-layout,
  .td-home-bottom,
  .td-stats,
  .td-facts { grid-template-columns: 1fr; }
  .td-week { display: none; }
  .td-month { display: none; }
  .td-agenda { display: block; }
  .td-cal-bar,
  .td-work-head,
  .td-task-card { align-items: flex-start; flex-direction: column; }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .td-week-head,
  .td-week-body { grid-template-columns: 42px repeat(7, minmax(72px, 1fr)); }
  .td-week { overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .td-app *,
  .td-app *::before { animation: none !important; transition: none !important; }
}
