:root {
  --bg: #05040b;
  --bg-2: #090712;
  --surface: rgba(255, 255, 255, 0.055);
  --surface-strong: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.2);
  --text: #fbf8ff;
  --muted: #9f97ad;
  --faint: #6f687a;
  --purple: #9b5cff;
  --purple-2: #c05cff;
  --cyan: #77d7ff;
  --rose: #ff5f7c;
  --green: #78c196;
  --green-bg: rgba(120, 193, 150, 0.13);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(125deg, rgba(92, 38, 145, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 28%),
    linear-gradient(180deg, var(--bg), #020611 88%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 7, 0.84);
  padding: 0 clamp(18px, 7vw, 96px);
  backdrop-filter: blur(18px);
}

.brand,
.main-nav,
.schedule-shell,
.fan-hub-shell,
.week-switcher,
.day-section,
.items-grid,
.watch-card,
.rest-card,
.info-section,
.item-dialog {
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.12rem;
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent),
    linear-gradient(135deg, var(--purple-2), var(--purple));
  color: white;
  font-weight: 1000;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 0.93rem;
  font-weight: 700;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
  color: var(--text);
}

.main-nav a.is-active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--purple);
  content: "";
}

main {
  padding-bottom: 110px;
}

.topbar,
main {
  transition: filter 0.32s ease, transform 0.32s ease;
}

body.is-sleeping .topbar,
body.is-sleeping main {
  filter: blur(3px) brightness(0.58) saturate(0.72);
  transform: scale(0.997);
}

.sleep-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 3, 8, 0.58);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.sleep-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.sleep-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  transform: translateY(8px);
  transition: transform 0.32s ease;
}

.sleep-overlay.is-active .sleep-panel {
  transform: none;
}

.sleep-mark {
  color: #e8ddff;
  font-size: clamp(3.2rem, 10vw, 7rem);
  font-weight: 1000;
  letter-spacing: 0;
  line-height: 0.8;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.56);
  animation: sleep-drift 2.8s ease-in-out infinite;
}

.sleep-panel strong {
  font-size: clamp(1.45rem, 4vw, 2.5rem);
  line-height: 1;
}

.sleep-panel p {
  max-width: 26rem;
  margin: 0;
  color: #c9c0d3;
  font-size: 0.95rem;
  line-height: 1.5;
}

@keyframes sleep-drift {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-8px) rotate(2deg);
  }
}

.hero {
  position: relative;
  isolation: isolate;
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 20px 36px;
  overflow: hidden;
  text-align: center;
}

.hero::after {
  position: absolute;
  right: clamp(18px, 8vw, 92px);
  bottom: -42px;
  z-index: -1;
  width: clamp(160px, 28vw, 320px);
  aspect-ratio: 1;
  background: url("assets/brand/lilika-brand-art.png") center / cover no-repeat;
  content: "";
  opacity: 0.16;
  transform: rotate(5deg);
  filter: saturate(0.9);
}

.hero h1 {
  margin: 0;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: 0;
}

.hero h1 span {
  color: var(--purple);
}

.hero p {
  margin: 18px 0 0;
  color: #b8b0c6;
  font-size: 1.08rem;
}

.live-countdown-shell {
  max-width: 1120px;
  margin: -8px auto 20px;
  padding: 0 20px;
}

.live-countdown {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  border: 1px solid rgba(181, 140, 255, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(181, 140, 255, 0.14), rgba(119, 215, 255, 0.06)),
    rgba(255, 255, 255, 0.045);
  box-shadow: 0 18px 50px rgba(4, 3, 12, 0.22);
  padding: 13px 14px;
}

.live-countdown-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 68% 28%, #ffd56d 0 12%, transparent 13%),
    linear-gradient(135deg, var(--purple), var(--cyan));
  box-shadow: 0 0 28px rgba(119, 215, 255, 0.22);
}

.live-countdown small,
.live-countdown strong,
.live-countdown p {
  display: block;
  min-width: 0;
}

.live-countdown small {
  color: var(--cyan);
  font-size: 0.62rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.live-countdown strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-countdown p {
  margin: 3px 0 0;
  color: #c2bacd;
  font-size: 0.82rem;
}

.live-countdown a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0 13px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}

.today-live-shell {
  max-width: 1120px;
  margin: 0 auto 32px;
  padding: 0 20px;
}

.today-live {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(180px, 0.45fr);
  align-items: stretch;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(119, 215, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(120deg, rgba(119, 215, 255, 0.1), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  padding: 16px;
}

.today-live.is-rest {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.today-live.is-rest a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 0 16px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.today-poster {
  position: relative;
  min-width: 0;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #130c1c;
  cursor: pointer;
}

.today-copy {
  align-self: center;
  min-width: 0;
}

.today-kicker {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(119, 215, 255, 0.24);
  border-radius: 999px;
  background: rgba(119, 215, 255, 0.08);
  color: var(--cyan);
  padding: 0 10px;
  font-size: 0.66rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.today-copy h2,
.today-live.is-rest h2 {
  margin: 12px 0 10px;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.today-copy p,
.today-live.is-rest p {
  margin: 0;
  color: #c2bacd;
  line-height: 1.58;
}

.today-next {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.today-next > span {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.today-next button {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  padding: 10px;
  cursor: pointer;
  text-align: left;
}

.today-next strong,
.today-next small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-next strong {
  font-size: 0.84rem;
}

.today-next small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.fan-hub-shell {
  max-width: 1120px;
  margin: -4px auto 28px;
  padding: 0 20px;
}

.fan-hub {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
  min-width: 0;
}

.fan-hub.is-alert-only {
  max-width: 760px;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
}

.fan-panel {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)),
    rgba(7, 7, 14, 0.72);
  padding: 16px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

.fan-panel > *,
.fan-panel-copy,
.alert-status {
  min-width: 0;
}

.fan-alert-panel {
  background:
    linear-gradient(135deg, rgba(255, 213, 109, 0.12), rgba(255, 95, 124, 0.07)),
    rgba(9, 8, 18, 0.72);
}

.fan-kicker {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-self: start;
  border: 1px solid rgba(119, 215, 255, 0.2);
  border-radius: 999px;
  background: rgba(119, 215, 255, 0.07);
  color: #aee8ff;
  padding: 0 9px;
  font-size: 0.6rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.fan-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.15rem, 2.5vw, 1.65rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.fan-panel p {
  margin: 6px 0 0;
  color: #c4bdcf;
  font-size: 0.84rem;
  line-height: 1.48;
}

.alert-status {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
}

.alert-status strong {
  display: block;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
}

.alert-status span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.fan-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.fan-button.is-primary {
  border-color: rgba(119, 215, 255, 0.34);
  background: linear-gradient(135deg, rgba(155, 92, 255, 0.95), rgba(119, 215, 255, 0.72));
  color: #fff;
}

.schedule-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.schedule-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.schedule-tools > span {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.type-filters {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.type-filters button {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #cdc7d6;
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
}

.type-filters button.is-active {
  border-color: rgba(119, 215, 255, 0.38);
  background: rgba(119, 215, 255, 0.1);
  color: var(--text);
}

.type-filters strong {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan);
  font-size: 0.62rem;
}

.week-switcher {
  view-transition-name: week-switcher;
  display: grid;
  width: 100%;
  max-width: 780px;
  min-height: 70px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 0 auto 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.055);
  padding: 10px 22px;
}

.week-switcher button {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  color: #cac4d3;
  cursor: pointer;
  font-weight: 900;
  white-space: nowrap;
}

.week-switcher button:last-child {
  justify-content: flex-end;
}

.week-switcher button:hover,
.week-switcher button:focus-visible {
  color: var(--text);
}

.week-switcher button:active {
  transform: translateY(1px);
}

.week-switcher button span {
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
}

.week-switcher div {
  text-align: center;
}

.week-switcher strong {
  display: block;
  color: var(--purple);
  font-size: 1.04rem;
}

.week-switcher time {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-week-btn {
  display: inline-flex;
  min-height: 28px;
  justify-content: center;
  margin-top: 9px;
  border: 1px solid rgba(119, 215, 255, 0.22) !important;
  border-radius: 999px;
  background: rgba(119, 215, 255, 0.08) !important;
  padding: 0 12px;
  color: #c9f1ff !important;
  font-size: 0.68rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.current-week-btn[hidden] {
  display: none;
}

.schedule-list {
  view-transition-name: schedule-list;
  display: grid;
  gap: 46px;
}

.day-section {
  display: grid;
  gap: 20px;
  content-visibility: auto;
  contain-intrinsic-size: 520px;
  scroll-margin-top: 78px;
}

.day-heading {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.day-heading h2 {
  margin: 0;
  color: #7f7889;
  font-size: 1.5rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.day-heading time {
  color: #756f82;
  font-size: 0.98rem;
  font-weight: 800;
}

.today-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid rgba(119, 215, 255, 0.28);
  border-radius: 999px;
  background: rgba(119, 215, 255, 0.09);
  color: var(--cyan);
  padding: 0 10px;
  font-size: 0.68rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.day-mini-stats {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  margin-left: auto;
}

.day-mini-stats span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: #a9a1b6;
  padding: 0 9px;
  font-size: 0.64rem;
  font-weight: 1000;
  text-transform: uppercase;
  white-space: nowrap;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 22px;
}

.watch-card {
  position: relative;
  width: 100%;
  height: clamp(340px, 38vw, 420px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #130c1c;
  cursor: pointer;
  isolation: isolate;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.watch-card:hover,
.watch-card:focus-within {
  border-color: rgba(155, 92, 255, 0.6);
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.26);
  transform: translateY(-2px);
}

.watch-card > .content-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.content-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.content-action {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(6, 8, 12, 0.68);
  color: var(--text);
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 1000;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.favorite-action {
  width: 34px;
  padding: 0;
  color: #ddd5e8;
  font-size: 1rem;
}

.favorite-action.is-active {
  border-color: rgba(255, 209, 102, 0.4);
  background: rgba(255, 209, 102, 0.16);
  color: #ffd166;
}

.watch-card > .content-actions .content-action {
  width: 34px;
  padding: 0;
}

.watch-card > .content-actions .content-action span:last-child {
  display: none;
}

.copy-action {
  color: #f6e9ff;
}

.calendar-action {
  color: #d6f3ff;
}

.calendar-action span:first-child {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  line-height: 1;
}

.alert-action {
  color: #ffe3a1;
}

.alert-action span:first-child {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 0.72rem;
  line-height: 1;
}

.alert-action.is-active {
  border-color: rgba(255, 213, 109, 0.42);
  background: rgba(255, 213, 109, 0.16);
  color: #ffd56d;
}

.copy-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  max-width: calc(100% - 36px);
  border: 1px solid rgba(119, 215, 255, 0.28);
  border-radius: 999px;
  background: rgba(8, 8, 14, 0.88);
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 1000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(14px);
}

.copy-toast.is-active {
  opacity: 1;
  transform: none;
}

.poster-bg,
.poster-bg img,
.poster-placeholder {
  position: absolute;
  inset: 0;
}

.poster-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.poster-placeholder {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
  background:
    radial-gradient(circle at 40% 25%, rgba(155, 92, 255, 0.58), transparent 42%),
    linear-gradient(145deg, #231031, #08070d 70%);
  padding: 36px 30px;
  color: rgba(255, 255, 255, 0.46);
  font-weight: 1000;
}

.poster-placeholder::before {
  position: absolute;
  inset: auto -18% -22% 10%;
  height: 58%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  content: "";
  transform: rotate(-16deg);
}

.poster-placeholder.kind-game {
  background:
    radial-gradient(circle at 68% 22%, rgba(120, 193, 150, 0.52), transparent 38%),
    linear-gradient(145deg, #1b2136, #09070f 72%);
}

.poster-placeholder.kind-movie {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 209, 102, 0.28), transparent 36%),
    linear-gradient(145deg, #251023, #07070e 74%);
}

.poster-placeholder.kind-react {
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 72, 94, 0.46), transparent 36%),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, #30101c, #08070e 74%);
}

.poster-placeholder.kind-anime,
.poster-placeholder.kind-cartoon {
  background:
    radial-gradient(circle at 64% 20%, rgba(192, 92, 255, 0.52), transparent 38%),
    linear-gradient(145deg, #211136, #07070f 72%);
}

.placeholder-initials,
.placeholder-kind {
  position: relative;
  z-index: 1;
}

.placeholder-initials {
  font-size: 4.1rem;
  line-height: 0.9;
  opacity: 0.62;
}

.placeholder-kind {
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  padding: 6px 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.watch-card.is-watched .poster-bg,
.watch-card.is-watched .poster-placeholder {
  filter: blur(6px) brightness(0.44) saturate(0.66);
  transform: scale(1.03);
}

.watch-card::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.84)),
    linear-gradient(90deg, rgba(64, 24, 94, 0.22), transparent);
  content: "";
}

.status-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 98px;
  height: 98px;
  place-items: center;
  border: 1px solid rgba(120, 193, 150, 0.34);
  border-radius: 15px;
  background: rgba(6, 8, 12, 0.66);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 1000;
  text-transform: uppercase;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.status-badge .check {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 4px solid var(--green);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
}

.status-badge.is-planned {
  border-color: rgba(155, 92, 255, 0.38);
  color: #c6a4ff;
}

.status-badge.is-planned .check {
  border-color: #c6a4ff;
}

.auto-status-badge {
  position: static;
  z-index: 4;
  display: inline-grid;
  max-width: 100%;
  min-height: 34px;
  align-content: center;
  justify-self: start;
  margin-bottom: 10px;
  border: 1px solid rgba(119, 215, 255, 0.28);
  border-radius: 999px;
  background: rgba(6, 8, 12, 0.72);
  color: #d9f5ff;
  padding: 5px 10px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
  pointer-events: none;
}

.auto-status-badge strong,
.auto-status-badge span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auto-status-badge strong {
  font-size: 0.62rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.auto-status-badge span {
  margin-top: 1px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.58rem;
  font-weight: 800;
}

.auto-status-badge.is-starting,
.auto-status-badge.is-live {
  border-color: rgba(255, 213, 109, 0.38);
  background: rgba(64, 42, 6, 0.72);
  color: #ffe7a8;
}

.auto-status-badge.is-next {
  border-color: rgba(181, 140, 255, 0.38);
  color: #e7d9ff;
}

.auto-status-badge.is-today-done {
  border-color: rgba(255, 255, 255, 0.14);
  color: #ddd7e9;
}

.card-content {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 4;
}

.card-content h3 {
  margin: 0 0 12px;
  font-size: 1rem;
  line-height: 1.2;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  padding: 0 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

.meta-row .time-chip {
  background: rgba(181, 140, 255, 0.2);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(181, 140, 255, 0.28);
}

.rest-card {
  display: flex;
  width: 100%;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  padding: 20px 24px;
}

.rest-card .rest-copy {
  display: flex;
  align-items: center;
  gap: 20px;
}

.rest-icon {
  color: #756f82;
  font-size: 1.8rem;
  font-weight: 1000;
  transform: rotate(-10deg);
}

.rest-card h3 {
  margin: 0;
  font-size: 1rem;
}

.rest-card p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 0.88rem;
  font-weight: 700;
}

.rest-card a {
  display: inline-flex;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 0 18px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 1000;
  text-transform: uppercase;
  text-align: center;
}

.info-section {
  max-width: 1120px;
  margin: 60px auto 0;
  border-top: 1px solid var(--line);
  padding: 30px 20px 0;
  color: var(--muted);
}

.info-section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.3rem;
}

.social div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
}

.reveal-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.42s ease, transform 0.42s ease;
}

.reveal-item.is-visible {
  opacity: 1;
  transform: none;
}

.empty-state {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 28px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.24s;
  animation-timing-function: ease;
}

.item-dialog {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 0;
  background: #0c0913;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.item-dialog::backdrop {
  background: rgba(0, 0, 0, 0.76);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 1.3rem;
}

.dialog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 28px;
}

.dialog-poster {
  position: relative;
  height: 330px;
  aspect-ratio: 2 / 3;
  min-height: 330px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #160f21;
  isolation: isolate;
}

.dialog-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.24s ease, transform 0.24s ease;
}

.dialog-poster .poster-placeholder {
  position: relative;
  min-height: 330px;
}

.dialog-poster.is-watched img,
.dialog-poster.is-watched .poster-placeholder {
  filter: blur(6px) brightness(0.5) saturate(0.68);
  transform: scale(1.035);
}

.dialog-poster.is-watched::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.34)),
    rgba(6, 5, 10, 0.18);
  content: "";
  pointer-events: none;
}

.dialog-info {
  align-self: center;
  min-width: 0;
  padding-right: 28px;
}

.dialog-info p {
  color: var(--muted);
  line-height: 1.65;
}

.dialog-info h2 {
  margin: 8px 0 10px;
  font-size: 2rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.dialog-info .status-badge {
  position: static;
  display: inline-flex;
  width: auto;
  min-height: 34px;
  height: auto;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.66rem;
  transform: none;
}

.dialog-info .status-badge .check {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-width: 2px;
  font-size: 0.72rem;
}

.dialog-info .status-badge span:last-child {
  line-height: 1;
  white-space: nowrap;
}

.dialog-info .auto-status-badge {
  position: static;
  display: inline-grid;
  width: auto;
  max-width: 100%;
  justify-self: start;
  margin-top: 8px;
  transform: none;
}

@media (min-width: 641px) {
  .hero h1 {
    font-size: 4.1rem;
  }

  .day-heading h2 {
    font-size: 1.85rem;
  }
}

@media (max-width: 960px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
    gap: 22px;
    scrollbar-width: none;
  }

  .main-nav::-webkit-scrollbar {
    display: none;
  }

  .items-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .watch-card {
    height: clamp(320px, 54vw, 420px);
  }

  .live-countdown {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .live-countdown a {
    grid-column: 2;
    justify-self: start;
  }

  .today-live {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .today-next {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .today-next > span {
    grid-column: 1 / -1;
  }

  .fan-hub {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.82fr);
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 12px 14px 10px;
  }

  .brand {
    max-width: 100%;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow-x: hidden;
    font-size: 0.7rem;
  }

  .main-nav a {
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    padding: 0 9px;
    text-align: center;
    line-height: 1.1;
    white-space: normal;
  }

  .main-nav a.is-active::after {
    display: none;
  }

  .hero {
    padding: 26px 14px 28px;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 12vw, 2.85rem);
    overflow-wrap: anywhere;
  }

  .hero h1 span {
    display: block;
  }

  .hero p {
    max-width: 20rem;
    margin-right: auto;
    margin-left: auto;
    overflow-wrap: anywhere;
  }

  .live-countdown-shell {
    margin: -8px auto 16px;
    padding: 0 12px;
  }

  .live-countdown {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    padding: 11px;
  }

  .live-countdown-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .live-countdown strong {
    white-space: normal;
  }

  .live-countdown p {
    font-size: 0.76rem;
  }

  .live-countdown a {
    width: 100%;
  }

  .today-live-shell {
    margin-bottom: 24px;
    padding: 0 12px;
  }

  .today-live,
  .today-live.is-rest {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px;
  }

  .today-poster {
    min-height: 220px;
  }

  .today-copy h2,
  .today-live.is-rest h2 {
    font-size: 1.78rem;
  }

  .today-copy p,
  .today-live.is-rest p {
    font-size: 0.92rem;
    overflow-wrap: anywhere;
  }

  .today-next {
    grid-template-columns: 1fr;
  }

  .today-live.is-rest a {
    width: 100%;
  }

  .fan-hub-shell {
    margin-bottom: 24px;
    padding: 0 12px;
  }

  .fan-hub {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .fan-panel {
    padding: 14px;
  }

  .fan-panel h2,
  .fan-panel p {
    overflow-wrap: anywhere;
  }

  .fan-button {
    width: 100%;
  }

  .schedule-tools {
    display: block;
    padding: 10px;
  }

  .schedule-tools > span {
    display: block;
    margin-bottom: 8px;
  }

  .type-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    overflow-x: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .type-filters::-webkit-scrollbar {
    display: none;
  }

  .type-filters button {
    width: 100%;
    justify-content: center;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .week-switcher {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 30px;
    padding: 14px;
    text-align: center;
  }

  .week-switcher button,
  .week-switcher button:last-child {
    justify-content: center;
    min-height: 38px;
    width: 100%;
    gap: 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
  }

  .week-switcher div {
    min-width: 0;
  }

  .week-switcher time {
    white-space: normal;
  }

  .day-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .day-mini-stats {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .items-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .watch-card {
    height: clamp(280px, 74vw, 360px);
    border-radius: 14px;
  }

  .watch-card > .content-actions {
    top: 52px;
    right: 12px;
  }

  .watch-card > .content-actions .copy-action span:last-child,
  .watch-card > .content-actions .calendar-action span:last-child {
    display: none;
  }

  .watch-card > .content-actions .copy-action,
  .watch-card > .content-actions .calendar-action {
    width: 34px;
    padding: 0;
  }

  .poster-placeholder {
    padding: 28px 22px;
  }

  .status-badge {
    top: 14px;
    left: 14px;
    display: inline-flex;
    width: auto;
    min-width: 0;
    height: 34px;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.64rem;
    transform: none;
  }

  .status-badge .check {
    width: 17px;
    height: 17px;
    border-width: 2px;
    font-size: 0.6rem;
  }

  .auto-status-badge {
    max-width: 100%;
    min-height: 30px;
    margin-bottom: 8px;
    padding: 4px 9px;
  }

  .auto-status-badge strong {
    font-size: 0.56rem;
  }

  .auto-status-badge span {
    font-size: 0.52rem;
  }

  .card-content {
    right: 14px;
    bottom: 14px;
    left: 14px;
  }

  .card-content h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
    -webkit-line-clamp: 2;
  }

  .meta-row {
    gap: 6px;
  }

  .meta-row span {
    min-height: 22px;
    padding: 0 8px;
    font-size: 0.68rem;
  }

  .rest-card {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
  }

  .rest-card .rest-copy {
    align-items: flex-start;
    gap: 14px;
  }

  .rest-card a {
    width: 100%;
    min-height: 42px;
  }

  .dialog-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .dialog-poster {
    width: min(100%, 260px);
    height: min(390px, 52vh);
    min-height: 240px;
    justify-self: center;
  }

  .dialog-info {
    padding-right: 0;
  }

  .dialog-info h2 {
    font-size: 1.48rem;
  }

  .dialog-info p {
    font-size: 0.92rem;
    line-height: 1.5;
  }

  .dialog-actions .content-action {
    flex: 1 1 auto;
  }

  .copy-toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    text-align: center;
  }
}

@media (max-width: 420px) {
  .topbar {
    padding-inline: 12px;
  }

  .hero h1 {
    font-size: 2.32rem;
  }

  .hero p {
    font-size: 0.96rem;
  }

  .schedule-shell {
    padding: 0 12px;
  }

  .today-poster {
    min-height: 190px;
  }

  .watch-card {
    height: clamp(250px, 72vw, 310px);
  }

  .placeholder-initials {
    font-size: 3.25rem;
  }

  .item-dialog {
    width: min(100% - 16px, 760px);
    max-height: calc(100dvh - 16px);
  }

  .dialog-layout {
    padding: 16px;
  }

  .dialog-close {
    top: 8px;
    right: 8px;
  }
}

@media (max-height: 520px) and (min-width: 641px) {
  .dialog-layout {
    grid-template-columns: 180px 1fr;
    gap: 22px;
    padding: 20px;
  }

  .dialog-poster {
    height: 270px;
    min-height: 270px;
  }

  .dialog-info h2 {
    font-size: 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal-item {
    opacity: 1;
    transform: none;
  }
}
