/* —— Takvim (Miruro tarzı, TR · site katalog) —— */
.aml-shell__main.sch-page,
.sch-page {
  position: relative;
  min-height: calc(100vh - 5.5rem);
  z-index: 0;
  width: 100% !important;
  max-width: none !important;
  align-self: stretch;
  margin-inline: 0 !important;
  padding-inline: 0;
  overflow: visible;
}

.sch {
  /* ink = okunaklı metin (neutral yüzey rengi DEĞİL) */
  --sch-ink: var(--theme-text);
  --sch-mute: var(--theme-muted);
  --sch-line: var(--theme-border);
  --sch-card: color-mix(in srgb, var(--theme-surface) 82%, transparent);
  --sch-panel: color-mix(in srgb, var(--theme-surface) 72%, transparent);
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.35rem 1.25rem 3rem;
  color: var(--sch-ink);
}
.sch.is-pending {
  opacity: 0.65;
  pointer-events: none;
}

/* Tam viewport — otomatik / admin görseli */
.sch-hero {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: 0;
}
.sch-hero__img {
  position: absolute;
  inset: -8%;
  background-image: var(--sch-hero);
  background-size: cover;
  background-position: center 25%;
  background-repeat: no-repeat;
  filter: blur(10px) saturate(1.25) brightness(0.95);
  transform: scale(1.06);
  opacity: 0.88;
  transition: background-image 0.45s ease, opacity 0.35s ease;
}
.sch-hero--fallback .sch-hero__img {
  opacity: 0.55;
  background-image:
    radial-gradient(80% 60% at 20% 10%, color-mix(in srgb, var(--theme-info) 40%, transparent), transparent 55%),
    radial-gradient(70% 50% at 90% 0%, color-mix(in srgb, var(--theme-accent) 32%, transparent), transparent 50%),
    linear-gradient(160deg, var(--theme-bg), var(--theme-bg) 55%, var(--theme-bg));
}
.sch-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-bg) 42%, transparent) 0%,
    color-mix(in srgb, var(--theme-bg) 58%, transparent) 38%,
    color-mix(in srgb, var(--theme-bg) 72%, transparent) 72%,
    color-mix(in srgb, var(--theme-bg) 88%, transparent) 100%
  );
}

.sch-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.45rem;
}
.sch-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.45rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--sch-panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--theme-shadow-soft);
}
.sch-title {
  margin: 0;
  font-family: var(--aml-font-display), Outfit, system-ui, sans-serif;
  font-size: clamp(1.9rem, 3.6vw, 2.55rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sch-ink);
}
.sch-sub {
  display: inline-block;
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.86rem;
  color: var(--sch-mute);
  max-width: 38rem;
  line-height: 1.45;
  border: 1px solid var(--theme-border);
  border-radius: 0.65rem;
  background: var(--sch-panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--theme-shadow-soft);
}
.sch-sub strong {
  color: var(--theme-text);
  font-weight: 750;
}
.sch-sub em,
.sch-sub__link {
  font-style: normal;
  color: var(--theme-accent);
  font-weight: 700;
  text-decoration: none;
}
.sch-sub__link:hover {
  color: var(--theme-accent-soft-ink);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.sch-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.sch-seg {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 0.2rem;
  border-radius: 999px;
  background: var(--sch-panel);
  border: 1px solid var(--sch-line);
  backdrop-filter: blur(10px);
}
.sch-seg button {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sch-mute);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  height: 2rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.sch-seg button.is-on {
  /* ink dolgu + bg yazı → light/dark’ta ters kontrast doğru */
  background: var(--theme-text);
  color: var(--theme-bg);
  border-color: var(--theme-text);
  box-shadow: var(--theme-shadow-soft);
}
.sch-seg button:not(.is-on):hover {
  color: var(--theme-text);
  background: var(--theme-hover-bg);
  border-color: var(--theme-hover-border);
}

.sch-week {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border-radius: 999px;
  border: 1px solid var(--sch-line);
  background: var(--sch-panel);
  backdrop-filter: blur(10px);
  padding: 0.15rem;
}
.sch-week span {
  min-width: 8.5rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--theme-text);
  padding: 0 0.35rem;
  font-variant-numeric: tabular-nums;
}
.sch-week button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--sch-mute);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sch-week button:hover {
  color: var(--theme-text);
  background: color-mix(in srgb, var(--theme-text) 6%, transparent);
}

.sch-layout {
  display: grid;
  grid-template-columns: 13.5rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.sch-days {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem;
  border-radius: 0.9rem;
  border: 1px solid var(--sch-line);
  background: var(--sch-panel);
  backdrop-filter: blur(14px);
}
.sch-day {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.65rem;
  border-left: 2px solid transparent;
}
.sch-day:hover {
  background: color-mix(in srgb, var(--theme-text) 4%, transparent);
}
.sch-day.is-active {
  background: var(--theme-hover-bg);
  border-left-color: var(--theme-accent);
}
.sch-day__label {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.sch-day__label strong {
  font-size: 0.84rem;
  font-weight: 750;
  color: var(--sch-mute);
}
.sch-day.is-active .sch-day__label strong,
.sch-day.is-today .sch-day__label strong {
  color: var(--theme-text);
}
.sch-day__label em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--theme-accent);
  margin-left: 0.35rem;
}
.sch-day__label small {
  font-size: 0.72rem;
  color: var(--sch-mute);
}
.sch-day__count {
  flex-shrink: 0;
  min-width: 1.6rem;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: var(--sch-mute);
}
.sch-day.is-active .sch-day__count {
  color: var(--theme-text);
}

.sch-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sch-block__title {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.75rem;
  padding: 0.32rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--theme-text);
  border: 1px solid var(--theme-border);
  border-radius: 999px;
  background: var(--sch-panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--theme-shadow-soft);
}

.sch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.sch-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid var(--sch-line);
  background: var(--sch-card);
  backdrop-filter: blur(8px);
  text-decoration: none;
  color: var(--sch-ink);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.sch-card:hover {
  border-color: var(--theme-hover-border);
  background: color-mix(in srgb, var(--theme-surface) 92%, var(--theme-hover-bg));
  transform: translateY(-1px);
  color: var(--sch-ink);
}
.sch-card__poster {
  width: 2.75rem;
  aspect-ratio: 2 / 3;
  border-radius: 0.35rem;
  overflow: hidden;
  background: var(--theme-bg);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.sch-card__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sch-card__ph {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, var(--theme-surface), var(--theme-bg));
}
.sch-card__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sch-card__title {
  font-size: 0.88rem;
  font-weight: 720;
  color: var(--theme-text);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sch-card__body small {
  font-size: 0.72rem;
  color: var(--sch-mute);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sch-card__body small em {
  font-style: normal;
  color: var(--theme-accent);
  font-weight: 650;
}

.sch-empty {
  margin: 0;
  padding: 2.5rem 1.25rem;
  text-align: center;
  border-radius: 0.9rem;
  border: 1px dashed var(--sch-line);
  color: var(--sch-mute);
  font-size: 0.9rem;
  background: color-mix(in srgb, var(--theme-bg) 28%, transparent);
}

@media (max-width: 900px) {
  .sch-layout {
    grid-template-columns: 1fr;
  }
  .sch-days {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.35rem;
    padding: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }
  .sch-day {
    flex: 0 0 auto;
    min-width: 7.5rem;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }
  .sch-day.is-active {
    border-bottom-color: var(--theme-surface);
  }
}

@media (max-width: 720px) {
  .sch {
    padding: 1rem 0.9rem 2.5rem;
  }
  .sch-grid {
    grid-template-columns: 1fr;
  }
  .sch-head {
    align-items: flex-start;
  }
  .sch-controls {
    width: 100%;
  }
  .sch-week {
    flex: 1;
  }
  .sch-week span {
    flex: 1;
  }
  .sch-hero__img {
    filter: blur(8px) saturate(1.2) brightness(0.95);
    opacity: 0.85;
  }
}

/* Light — anime bg görünsün; cam paneller okunaklı kalsın */
html[data-theme="light"] .sch {
  --sch-card: color-mix(in srgb, var(--theme-surface) 72%, transparent);
  --sch-panel: color-mix(in srgb, var(--theme-surface) 62%, transparent);
}
html[data-theme="light"] .sch-hero__img {
  filter: blur(8px) saturate(1.2) brightness(1.08);
  opacity: 0.82;
}
html[data-theme="light"] .sch-hero__veil {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-bg) 28%, transparent) 0%,
    color-mix(in srgb, var(--theme-bg) 38%, transparent) 40%,
    color-mix(in srgb, var(--theme-bg) 52%, transparent) 100%
  );
}
/* Sayfa zemini şeffaf — fixed hero arkadan net geçsin */
html[data-theme="light"] .aml-shell__main.sch-page,
html[data-theme="light"] .sch-page {
  background: transparent;
}
html[data-theme="light"]:has(.sch-page) body,
html[data-theme="light"]:has(.sch-page) .aml-app {
  background-color: transparent;
  background-image: none;
}
