:root {
  color-scheme: light;
  --page-bg: #ffffff;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #dbe3f0;
  --header-bg: #fafafa;
  --time-bg: #ffffff;
  --blue: #1a73e8;
  --time-width: 88px;
  --day-width: minmax(150px, 1fr);
  --slot-height: 64px;
  --half-slot-height: calc(var(--slot-height) / 2);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--page-bg);
}

.page {
  width: min(1220px, calc(100% - 24px));
  margin: 0 auto;
  padding: 20px 0 28px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-radius: 12px;
  background: #ffffff;
  margin-bottom: 8px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(1.375rem, 2.5vw, 1.875rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.roadmap-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.roadmap-link svg {
  width: 14px;
  height: 14px;
  display: block;
  color: var(--muted);
}

.roadmap-link i {
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.roadmap-link i svg {
  width: 14px;
  height: 14px;
  display: block;
}

.schedule-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
}

.page-footer-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.calendar-scroll {
  overflow-x: auto;
  background: #ffffff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: var(--time-width) repeat(7, var(--day-width));
  grid-template-rows: 56px repeat(34, var(--half-slot-height));
  min-width: 1120px;
  position: relative;
}

.corner,
.day-header,
.time-cell {
  position: relative;
  z-index: 1;
  min-height: var(--slot-height);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.corner {
  min-height: 56px;
  background: var(--header-bg);
}

.day-header {
  min-height: 56px;
  display: grid;
  place-items: center;
  padding: 8px;
  background: var(--header-bg);
  text-align: center;
}

.day-header strong {
  font-size: 0.96rem;
  font-weight: 800;
}

.time-cell {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 10px 10px 0 8px;
  background: var(--time-bg);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.slot-cell {
  position: relative;
  z-index: 1;
  min-height: var(--half-slot-height);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.schedule-event {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  justify-self: stretch;
  gap: 4px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-left: 4px solid #0278ad;
  background: #0399de;
  color: #ffffff;
  overflow: hidden;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.schedule-event--royal {
  border-left-color: #1d4ed8;
  background: #2664eb;
}

.schedule-event--cyan {
  border-left-color: #0f8fc9;
  background: #21aded;
}

.schedule-event strong {
  font-size: 0.92rem;
  line-height: 1.3;
  font-weight: 700;
}

.schedule-event-title {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  align-items: start;
  column-gap: 7px;
}

.schedule-event-title i {
  width: 10px;
  height: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: start;
  margin-top: 2px;
  line-height: 0;
}

.schedule-event-title i svg {
  width: 10px;
  height: 10px;
  display: block;
  color: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
}

.schedule-event-title strong {
  min-width: 0;
  line-height: 1.2;
  line-clamp: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-event span {
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.schedule-event--current {
  background: #bbf7d0;
  border-left-color: #22c55e;
  color: #166534;
}

.schedule-event--current-link {
  cursor: pointer;
}

.schedule-event--current strong,
.schedule-event--current span {
  color: #166534;
}

.schedule-event--current .schedule-event-title i svg {
  color: #166534;
}

.current-time-indicator {
  position: absolute;
  z-index: 3;
  height: 0;
  pointer-events: none;
}

.current-time-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: #dc2626;
}

.day-header--end {
  border-right: 0;
}

.slot-cell--last,
.time-cell--last {
  border-bottom: 0;
}

.slot-cell--end,
.time-cell--end {
  border-right: 0;
}

@media (max-width: 900px) {
  .page {
    width: min(100%, calc(100% - 20px));
    padding-top: 16px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    flex-wrap: wrap;
  }
}

