.downloads-body {
  min-height: 100vh;
  background: #0a0a0c;
}

.downloads-body [hidden] { display: none !important; }

#site-shell {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: #0b0b0d;
}

#site-shell::before {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 72px;
  height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, .015);
  background: #09090b;
  content: "";
}

.downloads-glow {
  position: fixed;
  inset: 72px 0 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.downloads-glow span {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
}

.downloads-glow span:first-child {
  top: -13%;
  left: -14%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(255, 117, 0, .12), transparent 68%);
}

.downloads-glow span:last-child {
  right: -16%;
  bottom: -18%;
  width: 48vw;
  height: 48vw;
  background: radial-gradient(circle, rgba(255, 117, 0, .075), transparent 68%);
}

.downloads-main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 58px 0 86px;
}

.downloads-header {
  max-width: 820px;
  margin: 0 auto 40px;
  text-align: center;
}

.downloads-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding: 8px 18px;
  border: 1px solid rgba(255, 130, 14, .45);
  border-radius: 999px;
  background: rgba(255, 130, 14, .045);
  color: #d99b5d;
  font: 700 13px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.downloads-kicker span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c36b0d;
  box-shadow: 0 0 12px rgba(255, 130, 14, .35);
}

.downloads-header h1 {
  margin: 0;
  color: #fff;
  font: italic 900 clamp(49px, 5.3vw, 68px)/.94 "Barlow Condensed", sans-serif;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.downloads-header p {
  max-width: 655px;
  margin: 22px auto 0;
  color: #a6a6a9;
  font-size: 17px;
  line-height: 1.55;
}

.account-strip {
  display: flex;
  min-height: 136px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 34px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 20, 24, .97), rgba(14, 14, 17, .97));
  box-shadow: 0 22px 58px rgba(0, 0, 0, .32);
}

.account-strip.is-connected {
  border-color: rgba(255, 130, 14, .36);
  background: linear-gradient(180deg, rgba(28, 20, 10, .97), rgba(14, 14, 17, .97));
  box-shadow: 0 20px 60px rgba(255, 105, 0, .1);
}

.account-strip__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.account-strip__avatar {
  display: none;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff901d, #e95c00);
  color: #09090b;
  font: 900 23px/1 "Barlow Condensed", sans-serif;
}

.account-strip.is-connected .account-strip__avatar { display: flex; }

.account-strip__copy strong {
  display: block;
  color: #fff;
  font: 800 25px/1.05 "Barlow Condensed", sans-serif;
  text-transform: uppercase;
}

.account-strip__copy { min-width: 0; }
.account-strip__copy strong,
.account-strip__meta small { overflow-wrap: anywhere; }

.account-strip.is-connected .account-strip__copy strong {
  font-size: 21px;
  text-transform: none;
}

.account-strip__copy > p {
  max-width: 610px;
  margin: 10px 0 0;
  color: #96969a;
  font-size: 15px;
  line-height: 1.55;
}

.account-strip__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 7px;
}

.account-strip__meta > span {
  padding: 4px 10px;
  border: 1px solid rgba(255, 130, 14, .42);
  border-radius: 999px;
  background: rgba(255, 130, 14, .12);
  color: #e7a460;
  font: 700 12px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.account-strip__meta small { color: #929296; font-size: 13px; }

.account-strip__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.patreon-button,
.account-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  font: 800 17px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.patreon-button {
  gap: 12px;
  min-width: 312px;
  height: 50px;
  max-height: 50px;
  padding: 0 28px;
  background: #ff7f0b;
  box-shadow: 0 12px 28px rgba(255, 117, 0, .3);
  color: #08080a;
}

.patreon-button:hover { background: #ff9b38; color: #08080a; transform: translateY(-1px); }

.patreon-button__logo {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  overflow: hidden;
  background: url("assets/patreon.png") center / contain no-repeat;
}

.account-action {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .045);
  color: #a9a9ad;
}

.account-action:hover { border-color: rgba(255, 130, 14, .48); color: #fff; }
.account-action:disabled { cursor: wait; opacity: .5; }
.account-action--refresh { color: #e4a05b; }

.downloads-alert {
  margin: 14px 4px -14px;
  color: #b18559;
  font-size: 13px;
  line-height: 1.45;
}

.downloads-alert.is-error { color: #e28f8f; }

.download-library { margin-top: 54px; }
.downloads-empty {
  margin: 0;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  background: rgba(15, 15, 19, .97);
  color: #8b8b90;
  text-align: center;
}
.season-block + .season-block { margin-top: 48px; }

.season-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.season-heading h2 {
  margin: 0;
  color: #fff;
  font: italic 900 clamp(31px, 3.2vw, 39px)/1 "Barlow Condensed", sans-serif;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.season-heading i {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(216, 103, 0, .7), rgba(216, 103, 0, .05));
}

.season-heading small {
  color: #737377;
  font: 700 13px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.episode-list { display: flex; flex-direction: column; gap: 14px; }

.episode-row {
  display: flex;
  min-height: 102px;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 14px;
  background: rgba(15, 15, 19, .97);
  transition: border-color .2s ease, background .2s ease;
}

.episode-row:hover { border-color: rgba(255, 130, 14, .22); }
.episode-row.is-unlocked {
  border-color: rgba(255, 130, 14, .28);
  background: linear-gradient(180deg, rgba(24, 19, 12, .98), rgba(15, 15, 19, .98));
}

.episode-number {
  display: flex;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #1b1b20;
}

.episode-number small {
  color: #5e5e63;
  font: 700 9px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.episode-number strong {
  margin-top: 2px;
  color: #6c6c71;
  font: 800 25px/1 "Barlow Condensed", sans-serif;
}

.episode-row.is-unlocked .episode-number { background: rgba(255, 130, 14, .12); }
.episode-row.is-unlocked .episode-number small { color: #af7a48; }
.episode-row.is-unlocked .episode-number strong { color: #f28a24; }

.episode-copy { flex: 1; min-width: 0; }
.demo-description { max-width: 620px; margin: 7px 0 0; color: #929297; font-size: 13px; line-height: 1.45; }
.episode-number--demo strong { color: #f28a24; }
.episode-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }

.episode-title h3 {
  margin: 0;
  color: #f3f3f4;
  font: 700 20px/1.1 "Barlow Condensed", sans-serif;
}

.episode-early {
  padding: 4px 9px;
  border-radius: 999px;
  background: #ff810d;
  color: #09090b;
  font: 800 10px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.episode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 7px;
  color: #747479;
  font-size: 13px;
}

.episode-meta__requirement { color: #b78957; }
.episode-row.is-unlocked .episode-meta__requirement { color: #809a73; }
.episode-meta__platforms {
  align-self: center;
  color: #747479;
}
.episode-meta__platforms .platform-icon {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.episode-action { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; column-gap: 18px; row-gap: 12px; }
.episode-action a {
  display: inline-flex;
  min-width: 184px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #85858a;
  font: 700 13px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.platform-icons { display: inline-flex; align-items: center; gap: 5px; }
.platform-icon { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: currentColor; }

.demo-block .episode-row { align-items: flex-start; }
.demo-block .episode-action { max-width: 210px; }
.demo-block .episode-action a { width: 100%; }

.episode-action a:hover { border-color: rgba(255, 130, 14, .5); color: #e5a260; }

.episode-row.is-unlocked .episode-action a {
  border-color: rgba(255, 130, 14, .42);
  background: rgba(255, 130, 14, .11);
  color: #e6a362;
}

.episode-row.is-unlocked .episode-action a:hover { background: #ff820e; color: #09090b; }

.season-block--loading .season-heading > span,
.season-block--loading .season-heading > small,
.season-block--loading .episode-row > * {
  border-radius: 6px;
  background: rgba(255, 255, 255, .055);
  animation: downloads-loading 1.2s ease-in-out infinite alternate;
}

.season-block--loading .season-heading > span { width: 130px; height: 34px; }
.season-block--loading .season-heading > small { width: 80px; height: 12px; }
.season-block--loading .episode-row > b { width: 60px; height: 60px; }
.season-block--loading .episode-row > span { width: 240px; height: 17px; }
.season-block--loading .episode-row > em { width: 184px; height: 42px; margin-left: auto; }
@keyframes downloads-loading { to { opacity: .35; } }

.access-panel {
  margin-top: 58px;
  padding: 34px 36px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 16px;
  background: rgba(14, 14, 18, .95);
}

.access-panel h2 {
  margin: 0 0 22px;
  color: #f5f5f5;
  font: 800 25px/1 "Barlow Condensed", sans-serif;
  text-transform: uppercase;
}

.access-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.access-panel h3 {
  margin: 0;
  color: #d98a3a;
  font: 700 16px/1 "Barlow Condensed", sans-serif;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.access-panel__grid > div:last-child h3 { color: #b8b8bb; }
.access-panel p { margin: 7px 0 0; color: #9a9a9e; font-size: 14px; line-height: 1.55; }

.downloads-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(32px, calc((100% - 1120px) / 2));
  border-top: 1px solid rgba(255, 255, 255, .055);
  background: #08080a;
  color: #68686d;
  font-size: 12px;
  margin-top: auto;
}

.downloads-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.downloads-footer nav a { color: #85858a; font: 600 12px/1 "Barlow Condensed", sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.downloads-footer nav a:hover { color: #d98a3a; }
.downloads-footer__adult { display: inline-flex; align-items: center; gap: 9px; }
.downloads-footer__adult b { display: inline-flex; width: 32px; height: 20px; align-items: center; justify-content: center; border: 1px solid #d95353; border-radius: 4px; color: #e26969; font: 800 11px/1 "Barlow Condensed", sans-serif; }

@media (max-width: 1000px) {
  .access-panel__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .downloads-main { width: min(100% - 34px, 1120px); }
  .downloads-body .account-strip {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 30px !important;
  }
  .downloads-body .download-library,
  .downloads-body .season-block { padding: 0 !important; }
  .downloads-body .access-panel { padding: 32px 30px !important; }
  .account-strip__actions { width: 100%; justify-content: flex-start; }
  .access-panel__grid { grid-template-columns: 1fr; gap: 24px; }
  .downloads-footer { align-items: flex-start; flex-direction: column; }
  .downloads-footer nav { justify-content: flex-start; }
}

@media (max-width: 620px) {
  #site-shell::before { height: 64px; flex-basis: 64px; }
  .downloads-glow { inset-block-start: 64px; }
  .downloads-main { width: min(100% - 28px, 1120px); padding: 38px 0 56px; }
  .downloads-header { margin-bottom: 32px; }
  .downloads-header h1 { font-size: clamp(42px, 14vw, 58px); }
  .downloads-header p { font-size: 15px; }
  .downloads-body .account-strip { min-height: 0; padding: 22px !important; }
  .account-strip__identity { width: 100%; gap: 14px; }
  .account-strip__avatar { flex-basis: 44px; width: 44px; height: 44px; }
  .account-strip__copy strong,
  .account-strip.is-connected .account-strip__copy strong { font-size: 20px; }
  .patreon-button { width: 100%; min-width: 0; }
  .account-action { flex: 1; }
  .download-library { margin-top: 40px; }
  .season-heading { gap: 10px; }
  .season-heading small { letter-spacing: .1em; }
  .episode-row {
    display: grid;
    min-height: 0;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: flex-start;
    gap: 14px;
    padding: 17px;
  }
  .episode-number { width: 54px; height: 54px; flex-basis: 54px; }
  .episode-copy { width: auto; }
  .episode-title { gap: 7px; }
  .episode-title h3 { font-size: 19px; }
  .episode-meta { gap: 9px 12px; }
  .episode-action {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none !important;
    padding-left: 0;
  }
  .episode-action a { width: 100%; }
  .downloads-body .access-panel { padding: 26px 22px !important; }
  .downloads-footer { padding: 30px 20px; }
}

@media (max-width: 420px) {
  .downloads-main { width: min(100% - 22px, 1120px); }
  .downloads-kicker { font-size: 11px; }
  .account-strip__actions { flex-direction: column; align-items: stretch; }
  .account-action { width: 100%; }
  .season-heading { flex-wrap: wrap; }
  .season-heading i { min-width: 24px; }
  .season-heading small { font-size: 10px; }
  .episode-row { grid-template-columns: 48px minmax(0, 1fr); gap: 12px; padding: 15px; }
  .episode-number { width: 48px; height: 48px; flex-basis: 48px; }
  .episode-number strong { font-size: 22px; }
  .episode-meta { font-size: 12px; }
  .access-panel h2 { font-size: 23px; }
  .downloads-footer { align-items: center; text-align: center; }
  .downloads-footer nav { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .season-block--loading * { animation: none !important; }
}
