/* stage-51-schedule-detail-polish */

#entryModal[data-action="schedule"][data-mode="view"] .modal-panel {
  width: min(900px, calc(100vw - 28px));
  border-color: color-mix(in srgb, var(--label-schedule, #5f9073) 18%, var(--glass-border));
  background:
    radial-gradient(circle at 10% -8%, color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 13%, transparent), transparent 18rem),
    radial-gradient(circle at 100% 6%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 76%, transparent), color-mix(in srgb, var(--glass-surface) 96%, transparent));
}

#entryModal[data-action="schedule"][data-mode="view"] .modal-fields {
  gap: clamp(14px, 1.8vw, 20px);
}

#entryModal[data-action="schedule"][data-mode="view"] .schedule-create-fields {
  display: grid;
  gap: clamp(12px, 1.7vw, 16px);
}

.schedule-detail-view {
  --schedule-detail-soft: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 13%, transparent);
  display: grid;
  gap: clamp(12px, 1.7vw, 16px);
}

.schedule-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 14%, var(--glass-border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 8px;
}

.schedule-detail-action-cluster {
  border-color: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 16%, var(--glass-border));
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, #fff 18%, transparent), transparent 56%),
    color-mix(in srgb, var(--glass-surface) 78%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
}

.schedule-detail-toolbar :is(.action-image-button, .icon-action) {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 15px;
}

.schedule-detail-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  gap: clamp(13px, 1.8vw, 18px);
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 18%, var(--glass-border));
  border-radius: 30px;
  background:
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 14%, transparent), transparent 18rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 58%, transparent), color-mix(in srgb, var(--glass-surface) 94%, transparent));
  box-shadow:
    var(--focus-shadow),
    inset 0 1px 0 color-mix(in srgb, #fff 17%, transparent);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: clamp(15px, 2vw, 20px);
}

.schedule-detail-card::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, color-mix(in srgb, #fff 18%, transparent), transparent 38%),
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 11%, transparent), transparent 16rem);
  content: "";
  pointer-events: none;
  z-index: -1;
}

.schedule-detail-hero {
  grid-template-columns: auto minmax(0, 1fr);
  border-color: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 16%, var(--glass-border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 13%, transparent), transparent 13rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 14%, transparent);
  padding: clamp(13px, 1.8vw, 16px);
}

.schedule-detail-hero .schedule-preview-dot {
  width: 15px;
  height: 15px;
  box-shadow:
    0 0 0 7px color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 12%, transparent),
    0 0 24px color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 30%, transparent);
}

.schedule-detail-hero span:not(.schedule-preview-dot) {
  color: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 74%, var(--muted-strong));
  font-size: 0.78rem;
  font-weight: 790;
}

.schedule-detail-hero strong {
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.54rem);
  font-weight: 800;
  letter-spacing: 0;
}

.schedule-detail-hero small {
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 670;
}

.schedule-detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 9px;
}

.schedule-detail-meta-grid span {
  min-height: 64px;
  border-color: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 12%, var(--glass-border));
  border-radius: 20px;
  background:
    radial-gradient(circle at 22% 0%, color-mix(in srgb, #fff 16%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 74%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  padding: 10px 12px;
}

.schedule-detail-meta-grid small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

.schedule-detail-meta-grid strong {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 740;
}

.schedule-detail-days {
  display: grid;
  gap: 10px;
}

.schedule-day-detail {
  position: relative;
  overflow: hidden;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 13%, var(--glass-border));
  border-radius: 24px;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, #fff 17%, transparent), transparent 12rem),
    linear-gradient(145deg, color-mix(in srgb, var(--glass-elevated) 42%, transparent), color-mix(in srgb, var(--glass-surface) 90%, transparent));
  box-shadow: var(--shadow-xs), inset 0 1px 0 color-mix(in srgb, #fff 13%, transparent);
  padding: 13px;
}

.schedule-day-detail h3 {
  margin: 0;
  color: color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 78%, var(--text));
  font-size: 1rem;
  font-weight: 800;
}

.schedule-day-lessons {
  display: grid;
  gap: 8px;
}

.schedule-detail-lesson {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border: 1px solid color-mix(in srgb, var(--schedule-detail-color, var(--label-schedule, #5f9073)) 10%, var(--glass-border));
  border-radius: 18px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, #fff 14%, transparent), transparent 58%),
    color-mix(in srgb, var(--glass-surface) 78%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 11%, transparent);
  padding: 10px 12px;
}

.schedule-detail-lesson span,
.schedule-detail-lesson strong {
  min-width: 0;
}

.schedule-detail-lesson span {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 760;
  line-height: 1.3;
}

.schedule-detail-lesson span small {
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 710;
}

.schedule-detail-lesson strong {
  color: var(--muted-strong);
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.schedule-detail-lesson.practice {
  border-color: color-mix(in srgb, var(--label-creative, #8c7ae6) 16%, var(--glass-border));
}

.schedule-extra-detail {
  border-style: solid;
  background:
    radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--label-creative, #8c7ae6) 9%, transparent), transparent 14rem),
    color-mix(in srgb, var(--glass-surface) 76%, transparent);
}

@media (max-width: 760px) {
  #entryModal[data-action="schedule"][data-mode="view"] .modal-panel {
    width: min(100vw - 14px, 620px);
  }

  .schedule-detail-toolbar {
    border-radius: 22px;
  }

  .schedule-detail-card {
    border-radius: 26px;
    padding: 14px;
  }

  .schedule-detail-hero {
    border-radius: 22px;
  }

  .schedule-detail-hero strong {
    white-space: normal;
  }

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

  .schedule-day-detail {
    border-radius: 22px;
    padding: 12px;
  }

  .schedule-detail-lesson {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .schedule-detail-lesson strong {
    text-align: left;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-detail-toolbar,
  .schedule-detail-card,
  .schedule-day-detail,
  .schedule-detail-lesson {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
