.c52-day-shell {
  --c52-day-hour-col: 92px;
  --c52-day-col-gap: 12px;
  --c52-day-row-height: 56px;

  display: flex;
  flex-direction: column;
  gap: 18px;
}

.c52-day-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 2px 2px 0;
}

.c52-day-head__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c52-day-head__eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f4f6fa;
  border: 1px solid #e4e8ef;
  color: var(--c52-ink-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c52-day-head__title {
  margin: 0;
  color: var(--c52-page-ink);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.c52-day-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.c52-day-board,
.c52-day-preview {
  border: 1px solid var(--c52-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.85) inset;
}

.c52-day-board {
  padding: 14px;
  overflow: hidden;
}

.c52-day-board-scroll {
  width: 100%;
  max-height: 690px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.c52-day-board-scroll::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.c52-day-board-scroll::-webkit-scrollbar-thumb {
  background: #d8dde6;
  border-radius: 999px;
}

.c52-day-table-shell {
  position: relative;
}

.c52-day-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.c52-day-table-row {
  display: grid;
  grid-template-columns: var(--c52-day-hour-col) minmax(0, 1fr);
  gap: var(--c52-day-col-gap);
  min-height: var(--c52-day-row-height);
  align-items: stretch;
}

.c52-day-hour-cell {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: start;
  justify-content: center;
  padding-top: 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border: 1px solid #e7ebf1;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.86),
    0 8px 18px rgba(15, 23, 42, 0.05);
}

.c52-day-hour-cell__label {
  color: var(--c52-ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.c52-day-track-cell {
  position: relative;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
  border: 1px solid #e7ebf1;
  overflow: hidden;
}

.c52-day-track-cell::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: #edf1f6;
  pointer-events: none;
}

.c52-day-events-layer {
  position: absolute;
  top: 0;
  left: calc(var(--c52-day-hour-col) + var(--c52-day-col-gap));
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.c52-day-events-layer.has-active .c52-day-event:not(.is-active) {
  opacity: 0.42;
  filter: saturate(0.82) brightness(0.96);
}

.c52-day-event {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  border-radius: 18px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.12);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
}

.c52-day-event:hover {
  transform: translateY(-1px);
}

.c52-day-event.is-active {
  transform: translateY(-2px) scale(1.01);
  opacity: 1 !important;
  filter: none !important;
  box-shadow:
    0 18px 36px rgba(15, 23, 42, 0.18),
    0 0 0 2px rgba(255,255,255,0.78),
    0 0 0 6px rgba(255,255,255,0.16),
    inset 0 1px 0 rgba(255,255,255,0.16);
}

.c52-day-event.is-active::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 8px;
  width: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 0 18px rgba(255,255,255,0.32);
}

.c52-day-event.is-active::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.22);
  pointer-events: none;
}

.c52-day-event--primary {
  background: linear-gradient(135deg, rgba(226, 0, 82, 0.95), rgba(235, 72, 136, 0.90));
}

.c52-day-event--secondary {
  background: linear-gradient(135deg, rgba(0, 182, 240, 0.96), rgba(41, 126, 255, 0.92));
}

.c52-day-event--tertiary {
  background: linear-gradient(135deg, rgba(5, 175, 98, 0.96), rgba(18, 199, 120, 0.92));
}

.c52-day-event__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  align-items: center;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.c52-day-event__title {
  max-width: 100%;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c52-day-event__time {
  font-size: 0.74rem;
  font-weight: 600;
  opacity: 0.92;
}

.c52-day-preview {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #0f1722;
}

.c52-day-preview::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: rgba(255,255,255,0.14);
  z-index: 2;
}

.c52-day-preview--primary::before {
  background: linear-gradient(90deg, rgba(226,0,82,1), rgba(255,98,158,0.8));
}

.c52-day-preview--secondary::before {
  background: linear-gradient(90deg, rgba(0,182,240,1), rgba(41,126,255,0.82));
}

.c52-day-preview--tertiary::before {
  background: linear-gradient(90deg, rgba(5,175,98,1), rgba(18,199,120,0.82));
}

.c52-day-preview__poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.c52-day-preview__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,12,20,0.18) 0%, rgba(7,12,20,0.30) 30%, rgba(7,12,20,0.82) 100%);
}

.c52-day-preview__content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 12px;
  padding: 24px;
  color: #fff;
}

.c52-day-preview__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  align-items: center;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.14);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.c52-day-preview__title {
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.c52-day-preview__text {
  margin: 0;
  max-width: 42ch;
  color: rgba(255,255,255,0.86);
  font-size: 0.96rem;
  line-height: 1.65;
}

.c52-day-preview__meta {
  display: grid;
  gap: 8px;
}

.c52-day-preview__meta-item {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: rgba(255,255,255,0.90);
  font-size: 0.86rem;
  line-height: 1.45;
}

.c52-day-preview__meta-label {
  color: rgba(255,255,255,0.68);
  font-weight: 600;
}

.c52-day-preview__progress {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.c52-day-preview__progress-item {
  flex: 1 1 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.c52-day-preview__progress-item.is-active {
  background: rgba(255,255,255,0.98);
}

.c52-day-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  border: 1px dashed #dbe2ec;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fafbfd);
  color: var(--c52-ink-soft);
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.7;
}

@media (max-width: 1200px) {
  .c52-day-layout {
    grid-template-columns: 1fr;
  }

  .c52-day-preview {
    min-height: 420px;
  }
}

@media (max-width: 768px) {
  .c52-day-shell {
    --c52-day-hour-col: 76px;
    --c52-day-col-gap: 10px;
    --c52-day-row-height: 52px;
  }

  .c52-day-board {
    padding: 12px;
  }

  .c52-day-hour-cell {
    border-radius: 14px;
  }

  .c52-day-hour-cell__label {
    font-size: 0.74rem;
  }

  .c52-day-preview {
    min-height: 360px;
  }

  .c52-day-preview__content {
    padding: 18px;
  }

  .c52-day-preview__text {
    font-size: 0.9rem;
  }
}