:root {
  --text-light: #f9f4e6;
  --gold: #d6b36a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: "Marcellus", Georgia, serif;
  color: var(--text-light);
  background: #060b16;
}

.dashboard-bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #060b16;
}

.dashboard-bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.performance-lite .dashboard-bg-video {
  opacity: 0.85;
}

.dashboard-bg-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 20%, rgba(134, 198, 255, 0.14), transparent 40%),
    radial-gradient(circle at 88% 78%, rgba(255, 220, 155, 0.14), transparent 40%),
    linear-gradient(180deg, rgba(5, 7, 16, 0.46), rgba(5, 7, 16, 0.72));
}

body.performance-lite .dashboard-bg-wrap::after {
  background: linear-gradient(180deg, rgba(5, 7, 16, 0.58), rgba(5, 7, 16, 0.78));
}

body.performance-lite .dashboard-shell,
body.performance-lite .dashboard-hero {
  background: rgba(12, 14, 24, 0.94);
}

body.performance-lite .profile-modal {
  backdrop-filter: none;
}

.dashboard-wrap {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: auto;
  padding: clamp(0.75rem, 2.3vw, 1.5rem);
}

.dashboard-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(250, 220, 160, 0.25);
  border-radius: 24px;
  padding: clamp(1rem, 2vw, 1.5rem);
  background:
    radial-gradient(circle at 10% -20%, rgba(255, 219, 148, 0.2), rgba(255, 219, 148, 0) 36%),
    linear-gradient(150deg, rgba(18, 21, 34, 0.94), rgba(14, 10, 10, 0.93));
}

.dashboard-hero {
  display: grid;
  gap: 0.9rem;
  padding: clamp(0.9rem, 2vw, 1.25rem);
  border-radius: 18px;
  border: 1px solid rgba(255, 225, 162, 0.2);
  background:
    linear-gradient(120deg, rgba(255, 226, 170, 0.08), rgba(255, 226, 170, 0.01) 55%),
    rgba(6, 8, 17, 0.45);
}

.dashboard-nox-brand {
  width: min(300px, 56vw);
  margin: 0 auto;
}

.dashboard-nox-brand img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.dashboard-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-avatar-wrap {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  padding: 3px;
  background: conic-gradient(from 0deg, rgba(255, 227, 165, 0.9), rgba(142, 214, 255, 0.8), rgba(255, 227, 165, 0.9));
}

.dashboard-avatar {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  border: 2px solid rgba(18, 20, 31, 0.95);
}

.dashboard-user-copy h1 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.2rem, 3.5vw, 2rem);
}

.house-line {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.house-badge-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.house-label {
  margin: 0;
}

.year-label {
  margin: 0;
  padding: 0.14rem 0.44rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 227, 162, 0.28);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  color: #efe3c7;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.74rem 1.34rem;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(120deg, #f5d98f, #efc86a);
  color: #241708;
}

.btn-ghost {
  border-color: rgba(255, 227, 162, 0.28);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-light);
}

.overview-stack {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border-radius: 18px;
  border: 1px solid rgba(250, 220, 160, 0.2);
  padding: 0.95rem;
  background: rgba(5, 7, 15, 0.5);
}

.staff-guide-card {
  margin-top: 0.9rem;
  border-color: rgba(170, 222, 255, 0.34);
  background:
    radial-gradient(circle at 106% -22%, rgba(170, 222, 255, 0.2), rgba(170, 222, 255, 0) 46%),
    linear-gradient(160deg, rgba(7, 15, 28, 0.86), rgba(12, 12, 20, 0.9));
}

.staff-guide-grid {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.staff-guide-step {
  border: 1px solid rgba(174, 228, 255, 0.28);
  border-radius: 12px;
  padding: 0.62rem;
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  gap: 0.45rem;
  align-content: space-between;
}

.staff-guide-headline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.staff-guide-label {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: rgba(188, 224, 248, 0.94);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.card h2 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.card-icon {
  width: 1.25em;
  text-align: center;
  filter: drop-shadow(0 0 8px rgba(255, 220, 150, 0.3));
}

.state-chip {
  border-radius: 999px;
  border: 1px solid rgba(255, 222, 162, 0.34);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.55rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.state-chip-warning {
  border-color: rgba(255, 212, 130, 0.48);
  background: rgba(255, 202, 112, 0.14);
}

.state-chip-red {
  border-color: rgba(255, 142, 142, 0.56);
  background: rgba(255, 82, 82, 0.2);
}

.state-chip-yellow {
  border-color: rgba(255, 216, 134, 0.54);
  background: rgba(255, 202, 112, 0.2);
}

.state-chip-green {
  border-color: rgba(157, 230, 185, 0.56);
  background: rgba(100, 206, 152, 0.2);
}

.state-chip-blue {
  border-color: rgba(163, 221, 255, 0.56);
  background: rgba(92, 168, 234, 0.2);
}

.state-chip-neutral {
  border-color: rgba(198, 208, 230, 0.45);
  background: rgba(144, 156, 180, 0.2);
}

.overview-stack > .creator-progress-card {
  border-color: rgba(181, 233, 255, 0.26);
  background:
    radial-gradient(circle at -5% -5%, rgba(147, 212, 255, 0.14), rgba(147, 212, 255, 0) 42%),
    linear-gradient(160deg, rgba(8, 14, 26, 0.85), rgba(9, 10, 19, 0.88));
}

.overview-stack > .start-date-card {
  border-color: rgba(255, 152, 152, 0.3);
  background:
    radial-gradient(circle at 105% -25%, rgba(255, 102, 102, 0.2), rgba(255, 102, 102, 0) 45%),
    linear-gradient(170deg, rgba(20, 10, 13, 0.92), rgba(10, 7, 11, 0.94));
}

.overview-stack > .character-card {
  border-color: rgba(255, 219, 120, 0.35);
  background:
    radial-gradient(circle at 108% -8%, rgba(255, 228, 140, 0.22), rgba(255, 228, 140, 0) 42%),
    linear-gradient(165deg, rgba(33, 24, 8, 0.9), rgba(20, 14, 6, 0.92));
}

.overview-stack > .lore-card {
  border-color: rgba(144, 232, 167, 0.34);
  background:
    radial-gradient(circle at 110% -12%, rgba(152, 243, 178, 0.18), rgba(152, 243, 178, 0) 44%),
    linear-gradient(165deg, rgba(8, 24, 16, 0.9), rgba(8, 18, 13, 0.92));
}

.overview-stack > .special-roles-card {
  border-color: rgba(147, 214, 255, 0.34);
  background:
    radial-gradient(circle at 106% -15%, rgba(171, 228, 255, 0.2), rgba(171, 228, 255, 0) 42%),
    linear-gradient(165deg, rgba(8, 14, 25, 0.9), rgba(9, 12, 20, 0.93));
}

.overview-stack > .discord-card {
  border-color: rgba(184, 174, 255, 0.34);
  background:
    radial-gradient(circle at 108% -14%, rgba(197, 184, 255, 0.2), rgba(197, 184, 255, 0) 42%),
    linear-gradient(165deg, rgba(16, 12, 29, 0.9), rgba(12, 10, 22, 0.93));
}

.dashboard-shell.role-staff .overview-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-shell.role-staff .overview-stack > .lore-card {
  grid-column: auto;
}

.dashboard-shell.role-staff .overview-stack > .special-roles-card {
  grid-column: auto;
}

.creator-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.creator-progress-percent {
  border-radius: 999px;
  border: 1px solid rgba(171, 236, 255, 0.36);
  padding: 0.2rem 0.58rem;
  font-family: "Cinzel", Georgia, serif;
}

.creator-progress-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-top: 0.65rem;
}

.creator-progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  max-width: 100%;
  background: linear-gradient(90deg, rgba(117, 198, 255, 0.95), rgba(181, 240, 255, 0.95));
}

.creator-checklist {
  list-style: none;
  margin: 0.7rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.42rem;
}

.prep-action-btn {
  margin-top: 0.72rem;
}

.overview-stack .card > .btn {
  margin-top: 0.66rem;
}

.notification-actions .btn,
.profile-required-actions .btn,
.series-day-actions .btn {
  margin-top: 0;
}

.creator-check {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.48rem 0.6rem;
  font-size: 0.92rem;
}

.creator-check.pending {
  background: rgba(255, 255, 255, 0.03);
}

.creator-check.done {
  border-color: rgba(172, 238, 197, 0.32);
  background: rgba(126, 221, 171, 0.08);
}

.prophecy-stage {
  border-radius: 14px;
  border: 1px solid rgba(255, 188, 148, 0.24);
  padding: 0.8rem;
  background: rgba(7, 7, 12, 0.62);
}

.prophecy-label,
.panel-text {
  margin: 0;
}

.prophecy-date-text {
  margin-top: 0.42rem;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 214, 170, 0.86);
}

.panel-text {
  color: rgba(245, 232, 203, 0.9);
}

#student-character-detail-story,
#student-character-detail-goal,
#student-character-detail-relations {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.prophecy-clock {
  margin-top: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.45rem;
  white-space: nowrap;
}

.prophecy-time-slot {
  min-width: 64px;
  border-radius: 10px;
  border: 1px solid rgba(255, 147, 147, 0.28);
  padding: 0.45rem 0.35rem;
  text-align: center;
  flex: 0 0 auto;
}

.prophecy-time-value {
  display: block;
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.35rem;
}

.prophecy-sep {
  transform: translateY(-7px);
}

.prophecy-progress {
  margin-top: 0.55rem;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.prophecy-progress-fill {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 121, 121, 0.94), rgba(255, 199, 136, 0.94));
}

.trailer-open-btn,
.lore-locked-btn,
#open-character-btn,
#open-discord-btn,
#open-student-forms-btn {
  width: 100%;
  margin-top: 0.72rem;
}

.lore-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lore-state-badge {
  border-radius: 999px;
  border: 1px solid rgba(255, 221, 164, 0.34);
  padding: 0.22rem 0.62rem;
  font-size: 0.7rem;
}

.series-schedule-card {
  margin-top: 1rem;
  border-color: rgba(176, 212, 255, 0.34);
  background:
    radial-gradient(circle at 102% -24%, rgba(159, 212, 255, 0.16), rgba(159, 212, 255, 0) 45%),
    linear-gradient(166deg, rgba(7, 13, 23, 0.92), rgba(8, 11, 18, 0.94));
}

.series-days-grid {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.series-day-btn {
  display: grid;
  gap: 0.12rem;
  align-content: center;
  justify-items: center;
  border-radius: 12px;
  border: 1px solid rgba(194, 224, 255, 0.3);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  min-height: 46px;
  cursor: pointer;
}

.series-day-night {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  color: rgba(176, 222, 255, 0.9);
}

.series-day-date {
  font-size: 0.78rem;
}

.series-day-btn:hover {
  border-color: rgba(214, 234, 255, 0.54);
  background: rgba(160, 204, 255, 0.12);
}

.series-day-panel {
  width: min(620px, 94vw);
}

.staff-characters-card {
  margin-top: 0.9rem;
  border-color: rgba(236, 202, 138, 0.34);
  background:
    radial-gradient(circle at 98% -20%, rgba(255, 222, 163, 0.2), rgba(255, 222, 163, 0) 44%),
    linear-gradient(166deg, rgba(25, 17, 8, 0.9), rgba(14, 11, 8, 0.92));
}

.team-characters-grid {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-forms-card {
  border-color: rgba(169, 219, 255, 0.34);
  background:
    radial-gradient(circle at 100% -22%, rgba(156, 221, 255, 0.2), rgba(156, 221, 255, 0) 44%),
    linear-gradient(166deg, rgba(9, 16, 28, 0.9), rgba(7, 10, 19, 0.92));
}

.staff-subroles-section {
  margin-top: 0.9rem;
}

.subroles-label {
  margin: 0.65rem 0 0.42rem;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 230, 194, 0.8);
}

.staff-subroles-grid {
  display: grid;
  gap: 0.55rem;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: stretch;
}

.staff-subrole-btn {
  border-radius: 12px;
  border: 1px solid rgba(255, 227, 162, 0.28);
  background: linear-gradient(160deg, rgba(255, 220, 146, 0.14), rgba(255, 220, 146, 0.04));
  color: var(--text-light);
  min-height: 54px;
  padding: 0.5rem 0.65rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.75rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.series-day-actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.series-day-edit-form {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.55rem;
}

.series-day-edit-form label {
  display: grid;
  gap: 0.24rem;
  font-size: 0.9rem;
}

.series-day-edit-form input,
.series-day-edit-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 233, 194, 0.26);
  background: rgba(4, 8, 17, 0.64);
  color: var(--text-light);
  min-height: 42px;
  padding: 0.5rem 0.68rem;
  font-family: inherit;
}

.notifications-btn {
  position: relative;
  min-width: 3.2rem;
  font-size: 1.15rem;
  line-height: 1;
  padding-left: 1rem;
  padding-right: 1rem;
}

.notifications-count {
  position: absolute;
  right: -0.26rem;
  top: -0.2rem;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.66rem;
  font-family: "Cinzel", Georgia, serif;
  color: #220f05;
  background: linear-gradient(120deg, #ffd98f, #f6b86b);
}

.notifications-panel {
  width: min(880px, 96vw);
  max-height: 88vh;
  overflow: auto;
}

.special-roles-panel {
  width: min(960px, 96vw);
}

.special-roles-list {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.58rem;
  max-height: min(65vh, 720px);
  overflow: auto;
  padding-right: 0.25rem;
}

.special-role-item {
  border-radius: 12px;
  border: 1px solid rgba(159, 220, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
  display: grid;
  gap: 0.42rem;
}

.special-role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.special-role-head h4 {
  margin: 0;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.96rem;
}

.special-role-meta {
  margin: 0;
  font-size: 0.84rem;
  color: rgba(236, 227, 206, 0.88);
}

.special-role-item .btn {
  justify-self: start;
}

.notifications-list {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.58rem;
  max-height: calc(88vh - 8.5rem);
  overflow: auto;
  padding-right: 0.2rem;
  overscroll-behavior: contain;
}

.notification-item {
  border-radius: 12px;
  border: 1px solid rgba(255, 220, 160, 0.22);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.65rem;
}

.notification-item h4 {
  margin: 0 0 0.35rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: 0.98rem;
}

.notification-actions {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  place-items: center;
  background: rgba(2, 4, 10, 0.74);
  backdrop-filter: blur(10px);
  padding: 1rem;
  overflow-y: auto;
}

.profile-modal.open {
  display: grid;
}

.profile-panel {
  width: min(900px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(255, 219, 148, 0.44);
  background: linear-gradient(160deg, rgba(13, 17, 28, 0.96), rgba(26, 16, 11, 0.92));
  padding: clamp(0.95rem, 2vw, 1.3rem);
}

.profile-required-modal {
  z-index: 470;
}

.profile-required-panel {
  width: min(680px, 94vw);
}

.profile-required-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.alohomora-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trailer-modal-panel {
  width: min(920px, 96vw);
}

.trailer-frame-shell {
  margin-top: 0.55rem;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 219, 148, 0.24);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 214, 143, 0.18), rgba(255, 214, 143, 0) 40%),
    #05070e;
}

.trailer-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.trailer-empty-state {
  margin-top: 0.85rem;
  min-height: 180px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 219, 148, 0.28);
  padding: 1.1rem;
  display: grid;
  place-items: center;
  text-align: center;
  color: rgba(245, 232, 203, 0.82);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 900px) {
  .prophecy-clock {
    gap: 0.26rem;
  }

  .prophecy-time-slot {
    min-width: 56px;
    padding: 0.38rem 0.28rem;
  }

  .prophecy-time-value {
    font-size: 1.12rem;
  }

  .overview-stack {
    grid-template-columns: 1fr;
  }

  .overview-stack > .lore-card {
    grid-column: 1;
  }

  .overview-stack > .special-roles-card {
    grid-column: 1;
  }

  .staff-guide-grid {
    grid-template-columns: 1fr;
  }

  .series-days-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-characters-grid {
    grid-template-columns: 1fr;
  }

  .staff-subroles-grid {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .series-days-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
