:root {
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.58);
  --text: #111827;
  --muted: #667085;
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(255, 255, 255, 0.42);
  --accent: #0a84ff;
  --accent-2: #32ade6;
  --danger: #ff453a;
  --shadow: 0 18px 40px rgba(34, 69, 124, 0.12);
  --shadow-strong: 0 30px 80px rgba(33, 61, 117, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Outfit", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(10, 132, 255, 0.22), transparent 24%),
    radial-gradient(circle at 88% 16%, rgba(94, 92, 230, 0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(50, 173, 230, 0.18), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, #eef4ff 45%, #f7faff 100%);
  background-attachment: fixed;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1200px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 64px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: 38px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(135deg, rgba(7, 20, 47, 0.82), rgba(18, 56, 104, 0.78)),
    linear-gradient(180deg, rgba(10, 132, 255, 0.75), rgba(50, 173, 230, 0.32));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(26px) saturate(160%);
  color: #f8fbff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -35% auto auto -10%;
  width: 52%;
  height: 80%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26), transparent 68%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.05) 44%, transparent 65%),
    linear-gradient(135deg, rgba(94, 92, 230, 0.72), rgba(50, 173, 230, 0.4));
}

.eyebrow,
.panel__eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(248, 251, 255, 0.72);
}

.panel__eyebrow {
  color: #7d8aa6;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero h1,
.panel h2,
.daily-card__day,
.cast-card__name,
.log-card__title,
.eviction-item__name {
  margin: 0;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(42px, 9vw, 84px);
  line-height: 0.94;
  font-weight: 800;
}

.hero__meta,
.controls,
.season-summary,
.daily-feed,
.insight-grid,
.modal-cast-grid,
.remaining-avatars {
  display: grid;
  gap: 12px;
}

.hero__meta {
  position: relative;
  z-index: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 26px;
}

.meta-card,
.panel,
.modal__dialog {
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(26px) saturate(180%);
}

.meta-card {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
}

.meta-card__label {
  display: block;
  font-size: 12px;
  color: rgba(248, 251, 255, 0.72);
}

.meta-card strong {
  display: block;
  margin-top: 10px;
  font-size: 21px;
  font-weight: 700;
  color: #ffffff;
}

.meta-card--remaining {
  grid-column: 1 / -1;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.meta-card--remaining:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
}

.remaining-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.remaining-card__hint {
  font-size: 13px;
  color: rgba(248, 251, 255, 0.72);
}

.remaining-avatars {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  margin-top: 14px;
}

.remaining-avatar {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 18px rgba(15, 43, 84, 0.18);
}

.remaining-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.remaining-avatar.is-evicted img {
  filter: grayscale(1) opacity(0.55);
}

.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(245, 249, 255, 0.72));
  box-shadow: var(--shadow);
}

.panel--primary,
.panel--wide {
  grid-column: 1 / -1;
}

.panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel__hint {
  font-size: 13px;
  color: var(--muted);
}

.controls {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.button {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.button:hover:enabled {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.44;
}

.button--accent {
  border: 0;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 14px 26px rgba(10, 132, 255, 0.24);
}

.button--light,
.button--ghost {
  font-weight: 700;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.54);
  background: rgba(255, 255, 255, 0.58);
}

.button--ghost {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.34);
}

.season-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
}

.summary-chip {
  padding: 15px 16px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.55);
  color: #33517a;
  font-weight: 700;
  text-align: center;
}

.daily-feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.daily-card,
.log-card,
.insight-card,
.eviction-item,
.cast-card {
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 22px;
  background: var(--surface-strong);
  box-shadow: 0 10px 24px rgba(63, 95, 145, 0.08);
}

.daily-card {
  padding: 16px;
}

.daily-card__top,
.log-card__top,
.cast-card__top,
.insight-card__header,
.eviction-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.daily-card__day {
  font-size: 16px;
  font-weight: 700;
}

.daily-card__text,
.daily-card__meta,
.cast-card__sub,
.cast-card__tagline,
.stat-line span:last-child,
.eviction-item__meta,
.log-entry__meta,
.insight-card p {
  color: var(--muted);
}

.daily-card__text {
  margin-top: 10px;
  line-height: 1.65;
}

.daily-card__meta {
  margin-top: 8px;
  font-size: 12px;
}

.status-pill,
.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.status-pill {
  color: #0b6ed0;
  background: rgba(235, 245, 255, 0.92);
}

.status-pill.status-pill--evicted {
  color: #b42318;
  background: rgba(255, 239, 237, 0.9);
}

.badge {
  color: #39557e;
  background: rgba(255, 255, 255, 0.84);
}

.badge.badge--warn {
  color: #0b6ed0;
  background: rgba(231, 243, 255, 0.96);
}

.week-log,
.eviction-list,
.daily-feed {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted);
}

.log-card {
  padding: 18px;
}

.log-card__title {
  font-size: 18px;
  font-weight: 700;
}

.log-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.log-entry {
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(243, 248, 255, 0.98), rgba(238, 245, 255, 0.92));
}

.log-entry__meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.insight-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-card {
  padding: 18px;
}

.insight-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.insight-card p {
  margin: 10px 0 0;
  line-height: 1.72;
}

.eviction-item {
  align-items: center;
  padding: 14px 16px;
}

.eviction-item__name {
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
}

.modal.is-open {
  display: block;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 32, 0.48);
  backdrop-filter: blur(10px);
}

.modal__dialog {
  position: relative;
  width: min(1080px, calc(100% - 24px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 22px;
  overflow: auto;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 248, 255, 0.9));
  box-shadow: var(--shadow-strong);
}

.modal__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal__close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.modal-cast-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cast-card {
  padding: 16px;
}

.cast-card.is-evicted {
  opacity: 0.72;
}

.cast-card.is-hoh {
  border-color: rgba(10, 132, 255, 0.42);
}

.cast-card.is-nominee {
  border-color: rgba(255, 69, 58, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 245, 245, 0.88));
}

.cast-card__identity {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: start;
}

.cast-card__avatar {
  width: 68px;
  height: 84px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(180deg, #dce9ff, #f2f7ff);
}

.cast-card.is-evicted .cast-card__avatar {
  filter: grayscale(1) opacity(0.72);
}

.cast-card__name {
  font-size: 18px;
  font-weight: 700;
}

.cast-card__sub {
  margin-top: 4px;
  font-size: 13px;
}

.cast-card__tagline {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.62;
}

.stats {
  display: grid;
  gap: 8px;
}

.stat-line {
  display: grid;
  grid-template-columns: 72px 1fr 34px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.stat-bar {
  height: 9px;
  border-radius: 999px;
  background: rgba(191, 207, 233, 0.34);
  overflow: hidden;
}

.stat-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

body.modal-open {
  overflow: hidden;
}

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

  .panel--primary,
  .panel--wide {
    grid-column: auto;
  }

  .daily-feed,
  .insight-grid,
  .modal-cast-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 100%);
    padding-top: 12px;
  }

  .hero {
    padding: 22px;
    border-radius: 30px;
  }

  .remaining-avatars {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
  }

  .controls,
  .season-summary,
  .daily-feed,
  .insight-grid,
  .modal-cast-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
    border-radius: 26px;
  }

  .button {
    min-height: 50px;
  }

  .modal__dialog {
    width: min(100% - 14px, 100%);
    margin: 7px auto;
    padding: 18px;
    max-height: calc(100vh - 14px);
  }
}
