/* Page layouts: headers, the library grid, game and store details, Discover,
   History, PC Control, Settings, the launch prompt and the sign-in page. */

/* ======================================================= page header ===== */

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 24px;
  padding: 28px var(--gutter) 22px;
}

.page-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 16px;
  min-width: 0;
}

.page-count {
  color: var(--text-2);
  font-size: 15px;
}

.page-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chips-bar {
  margin-bottom: 18px;
}

@media (max-width: 719px) {
  .page-head {
    padding-top: 16px;
  }

  .page-tools {
    width: 100%;
  }

  .page-tools > .input-with-icon {
    flex: 1;
  }
}

/* ===================================================== library grid ===== */

.game-grid {
  --cols: 6;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 30px 20px;
  padding: 6px var(--gutter) 0;
}

@media (max-width: 1439px) {
  .game-grid {
    --cols: 5;
  }
}

@media (max-width: 899px) {
  .game-grid {
    --cols: 4;
  }
}

@media (max-width: 719px) {
  .game-grid {
    --cols: 3;
    gap: 22px 12px;
  }
}

@media (max-width: 359px) {
  .game-grid {
    --cols: 2;
  }
}

@media (min-width: 1680px) {
  .game-grid {
    --cols: 7;
  }
}

.grid-empty {
  grid-column: 1 / -1;
}

.lib-filter-wrap {
  width: 260px;
}

.btn-sort {
  height: 46px;
  padding: 0 16px 0 14px;
  gap: 8px;
  font-size: 14px;
}

@media (max-width: 719px) {
  .lib-filter-wrap {
    width: auto;
  }
}

/* ============================================================== home ===== */

.page-home .row-group {
  padding-top: 4px;
}

.page-home .hero + .row-group {
  margin-top: -16px;
}

.welcome {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 62vh, 680px);
  padding: calc(var(--topbar-height) + 40px) var(--gutter) 64px;
  margin-bottom: 40px;
}

.welcome-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.6px) 0 0 / 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 75% 40%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 80% at 75% 40%, #000 10%, transparent 72%);
}

.welcome-glow {
  position: absolute;
  top: 8%;
  right: 6%;
  width: min(48vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76, 125, 255, 0.34), rgba(76, 125, 255, 0.08) 45%, transparent 68%);
}

.welcome-stack {
  position: absolute;
  top: 50%;
  right: 9%;
  width: min(34vw, 470px);
  aspect-ratio: 1.2;
  transform: translateY(-42%);
}

.welcome-card {
  position: absolute;
  width: 44%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.welcome-card-1 {
  left: 2%;
  top: 14%;
  transform: rotate(-10deg);
  opacity: 0.86;
}

.welcome-card-2 {
  z-index: 2;
  left: 28%;
  top: 0;
  transform: scale(1.08);
}

.welcome-card-3 {
  right: 2%;
  top: 14%;
  transform: rotate(10deg);
  opacity: 0.86;
}

.welcome-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 8px rgba(76, 125, 255, 0.22);
}

.welcome-play .icon {
  width: 28px;
  height: 28px;
  margin-left: 3px;
}

@media (max-width: 1023px) {
  .welcome-stack {
    display: none;
  }
}

.welcome-body {
  max-width: 640px;
}

.welcome-body .t-label {
  color: var(--accent-text);
  margin-bottom: 14px;
}

.welcome-body h1 {
  margin-bottom: 16px;
  text-wrap: balance;
}

.welcome-text {
  max-width: 52ch;
  color: var(--text-2);
  font-size: 16px;
  margin-bottom: 30px;
}

.welcome-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================================================== game details ===== */

.detail-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(500px, 68vh, 780px);
}

.detail-hero .hero-media {
  -webkit-mask-image: linear-gradient(to bottom, #000 34%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 34%, rgba(0, 0, 0, 0.5) 70%, transparent 100%);
}

.detail-hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: 760px;
  padding: calc(var(--topbar-height) + var(--safe-top) + 24px) var(--gutter) 48px;
}

.detail-title {
  margin-bottom: 26px;
}

.detail-title .hero-logo {
  max-height: 170px;
  max-width: min(460px, 86%);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.detail-actions .btn-round {
  width: 68px;
  height: 68px;
  background: var(--over-art);
}

.detail-actions .btn-round:hover {
  background: var(--over-art-hover);
}

.detail-actions .btn-secondary {
  background: var(--over-art);
}

.detail-stat {
  margin-top: 20px;
  color: rgba(243, 245, 249, 0.78);
  font-size: 14px;
  font-weight: 550;
  white-space: pre-wrap;
}

.detail-price {
  margin: -8px 0 24px;
}

.detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  padding: 8px var(--gutter) 0;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.detail-section h2 {
  margin-bottom: 14px;
}

.detail-desc {
  max-width: 68ch;
  color: rgba(243, 245, 249, 0.86);
  font-size: 16px;
  line-height: 1.65;
  white-space: pre-line;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.fact dt {
  margin-bottom: 6px;
}

.fact dd {
  font-size: 15px;
  font-weight: 550;
}

.shot-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin: -8px 0 -16px calc(-1 * var(--gutter));
  padding: 8px 0 16px var(--gutter);
  scroll-padding-inline: var(--gutter);
}

.shot-strip.is-overflowing {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
}

.shot-strip.is-overflowing.is-end {
  -webkit-mask-image: none;
  mask-image: none;
}

.shot-strip::-webkit-scrollbar {
  display: none;
}

.shot-strip > [role="listitem"] {
  flex: none;
  width: min(380px, 72vw);
  scroll-snap-align: start;
}

.shot {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.shot .art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot:hover,
.shot:focus-visible {
  transform: scale(1.03);
  box-shadow: var(--shadow-lift);
}

.session-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-panel);
  background: var(--bg-raised);
  overflow: hidden;
}

.session-row {
  display: grid;
  grid-template-columns: 160px 110px auto 1fr;
  align-items: center;
  gap: 8px 18px;
  padding: 14px 20px;
}

.session-row + .session-row {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.session-when {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.session-day {
  font-weight: 600;
}

.session-time,
.session-length {
  color: var(--text-2);
  font-size: 14px;
}

.session-length {
  color: var(--text);
  font-weight: 600;
}

.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}

/* One column below 1200 px: About and Screenshots first, then the facts, in
   the same order as the markup, the skeleton and the phone layout. */
@media (max-width: 1199px) {
  .detail-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 719px) {
  .detail-hero {
    min-height: clamp(520px, 78vh, 680px);
  }

  .detail-hero-body {
    padding-bottom: 32px;
  }

  .detail-hero .hero-poster {
    height: 40%;
  }

  .detail-actions {
    flex-wrap: nowrap;
  }

  .detail-actions .btn-hero {
    flex: 1;
    min-width: 0;
    height: 60px;
    padding: 0 24px;
    font-size: 20px;
  }

  .detail-actions .btn-round {
    width: 60px;
    height: 60px;
  }

  .detail-title {
    margin-bottom: 20px;
  }

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

  .session-row {
    grid-template-columns: 1fr auto;
    padding: 14px 16px;
  }

  .session-row .session-chip {
    grid-column: 1 / -1;
  }

  .session-row .session-chip + .session-chip {
    margin-top: -6px;
  }
}

/* Store pages. */
.store-media.is-header {
  background: var(--bg-raised);
}

.store-header-frame {
  position: absolute;
  z-index: 1;
  right: max(var(--gutter), 6%);
  top: calc(var(--topbar-height) + 30px);
  width: min(46%, 620px);
  aspect-ratio: 460 / 215;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.store-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 1199px) {
  .store-header-frame {
    width: min(56%, 520px);
  }
}

@media (max-width: 719px) {
  .store-header-frame {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    top: calc(var(--topbar-height) + var(--safe-top) + 8px);
  }
}

/* =========================================================== discover ===== */

.store-search-wrap {
  width: 320px;
}

@media (max-width: 719px) {
  .store-search-wrap {
    width: auto;
  }
}

.spotlight {
  position: relative;
  isolation: isolate;
  display: block;
  margin: 0 var(--gutter) 44px;
  height: clamp(320px, 44vh, 470px);
  overflow: hidden;
  border-radius: 20px;
  background: var(--bg-raised);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.spotlight:hover {
  box-shadow: var(--shadow-lift);
}

.spotlight:focus-visible {
  outline-offset: 4px;
}

.spotlight-media {
  position: absolute;
  inset: 0;
}

.spotlight-hero {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 30%;
  transition: transform 600ms var(--ease);
}

.spotlight:hover .spotlight-hero {
  transform: scale(1.03);
}

.spotlight-blur {
  position: absolute;
  inset: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(46px) saturate(1.3) brightness(0.6);
}

.spotlight-header {
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(48%, 560px);
  aspect-ratio: 460 / 215;
  transform: translateY(-50%);
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
}

.spotlight-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(var(--bg-rgb), 0.9) 0%, rgba(var(--bg-rgb), 0.55) 34%, rgba(var(--bg-rgb), 0) 64%),
    linear-gradient(0deg, rgba(var(--bg-rgb), 0.7) 0%, rgba(var(--bg-rgb), 0) 48%);
}

.spotlight-body {
  position: absolute;
  z-index: 2;
  left: 40px;
  right: 40px;
  bottom: 36px;
  max-width: 560px;
}

.spotlight-body .t-label {
  color: rgba(243, 245, 249, 0.8);
  margin-bottom: 10px;
}

.spotlight-title {
  margin-bottom: 18px;
  text-wrap: balance;
}

.spotlight-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.spotlight-cta {
  background: var(--over-art);
}

.spotlight:hover .spotlight-cta {
  background: var(--over-art-hover);
}

.sk-spotlight {
  height: clamp(320px, 44vh, 470px);
  margin: 0 var(--gutter) 44px;
  border-radius: 20px;
}

.discover-results {
  padding: 0 var(--gutter);
}

.results-title {
  margin-bottom: 18px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px 18px;
}

@media (max-width: 719px) {
  .spotlight {
    height: 380px;
    border-radius: 16px;
  }

  .spotlight-body {
    left: 20px;
    right: 20px;
    bottom: 22px;
  }

  .spotlight-scrim {
    background: linear-gradient(0deg, rgba(var(--bg-rgb), 0.92) 0%, rgba(var(--bg-rgb), 0.5) 46%, rgba(var(--bg-rgb), 0) 72%);
  }

  .spotlight-header {
    top: 22px;
    left: 20px;
    right: 20px;
    width: auto;
    transform: none;
  }

  .store-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 22px 12px;
  }
}

/* ============================================================ history ===== */

.week {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 16px;
  padding: 0 var(--gutter);
  margin-bottom: 44px;
}

.week-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(76, 125, 255, 0.2), transparent 60%),
    var(--bg-raised);
}

.week-hours {
  margin-top: 8px;
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: 104px;
  margin-top: auto;
  padding-top: 22px;
}

.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
}

.week-bar-track {
  display: flex;
  align-items: flex-end;
  flex: 1;
  width: 100%;
  max-width: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.week-bar {
  width: 100%;
  height: var(--h, 0%);
  border-radius: 6px;
  background: rgba(243, 245, 249, 0.3);
}

.week-day.is-today .week-bar {
  background: var(--accent);
}

.week-day-label {
  color: var(--text-2);
  font-size: 11px;
  font-weight: 650;
}

.week-day.is-today .week-day-label {
  color: var(--text);
}

.week-top .t-label {
  margin-bottom: 16px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar {
  display: grid;
  grid-template-columns: 28px minmax(90px, 200px) minmax(0, 1fr) 96px;
  align-items: center;
  gap: 14px;
}

.bar-thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  border-radius: 5px;
  overflow: hidden;
  color: var(--text-2);
}

.bar-name {
  font-weight: 600;
  font-size: 14px;
}

a.bar-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bar-track {
  height: 8px;
  border-radius: 4px;
  background: var(--surface);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: var(--share, 0%);
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-pressed), var(--accent-hover));
}

.bar-value {
  text-align: right;
  color: var(--text-2);
  font-size: 13px;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 0 var(--gutter);
}

.day-title {
  margin-bottom: 12px;
}

.day-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-panel);
  background: var(--bg-raised);
  overflow: hidden;
}

.entry {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}

.entry + .entry {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.session-thumb {
  position: relative;
  width: 40px;
  flex: none;
  border-radius: 7px;
  overflow: hidden;
}

.session-thumb-desktop {
  display: grid;
  place-items: center;
  aspect-ratio: 2 / 3;
  background: linear-gradient(160deg, #23324f, #121722);
  color: #c9d6ff;
}

.session-thumb-desktop .icon {
  width: 22px;
  height: 22px;
}

.entry-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.entry-title {
  font-size: 15px;
  font-weight: 650;
}

a.entry-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.entry-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: none;
}

.entry-length {
  font-weight: 650;
}

.entry-time {
  color: var(--text-2);
  font-size: 13px;
}

@media (max-width: 899px) {
  .week {
    grid-template-columns: minmax(0, 1fr);
  }

  .bar {
    grid-template-columns: 28px minmax(0, 1fr) 80px;
  }

  .bar-track {
    grid-column: 2 / -1;
    grid-row: 2;
  }
}

@media (max-width: 719px) {
  .entry {
    padding: 14px 16px;
    align-items: flex-start;
  }

  /* A long device label ("Android phone · Chrome") wraps in its column
     instead of running under the session's time range. */
  .entry-meta .session-chip {
    white-space: normal;
  }
}

/* ========================================================= PC Control ===== */

.desktop-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 460px);
  align-items: center;
  gap: 40px;
  margin: 12px var(--gutter) 24px;
  padding: 48px;
  border-radius: 24px;
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(76, 125, 255, 0.28), transparent 60%),
    radial-gradient(60% 90% at 0% 100%, rgba(60, 207, 142, 0.1), transparent 60%),
    linear-gradient(160deg, #161b27, #0f1218);
}

.desktop-body {
  grid-column: 1;
  grid-row: 1;
  max-width: 560px;
}

.desktop-body .t-label {
  color: var(--accent-text);
  margin-bottom: 12px;
}

.desktop-body h1 {
  margin-bottom: 14px;
}

.desktop-text {
  color: var(--text-2);
  font-size: 16px;
  max-width: 50ch;
  margin-bottom: 28px;
}

.desktop-art {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mock-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(80% 90% at 70% 10%, rgba(106, 147, 255, 0.55), transparent 60%),
    radial-gradient(70% 80% at 10% 100%, rgba(60, 207, 142, 0.35), transparent 60%),
    linear-gradient(135deg, #1b2a52, #10162a);
  box-shadow: 0 0 0 6px #0b0d12, 0 0 0 7px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(0, 0, 0, 0.55);
}

.mock-window {
  position: absolute;
  border-radius: 8px;
  background: rgba(243, 245, 249, 0.92);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.mock-window-1 {
  left: 9%;
  top: 12%;
  width: 46%;
  height: 52%;
}

.mock-window-2 {
  left: 42%;
  top: 30%;
  width: 46%;
  height: 46%;
  background: rgba(23, 26, 33, 0.95);
}

.mock-bar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 14%;
  border-radius: 8px 8px 0 0;
  background: rgba(10, 11, 14, 0.12);
}

.mock-window-2 .mock-bar {
  background: rgba(255, 255, 255, 0.08);
}

.mock-taskbar {
  position: absolute;
  left: 50%;
  bottom: 4%;
  display: flex;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(10, 11, 14, 0.6);
  transform: translateX(-50%);
}

.mock-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: rgba(243, 245, 249, 0.55);
}

.mock-dot:first-child {
  background: var(--accent);
}

.mock-cursor {
  position: absolute;
  left: 63%;
  top: 56%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 18px solid #fff;
  transform: rotate(-28deg);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.mock-stand {
  width: 22%;
  height: 14px;
  margin-top: 13px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(#141821, #0c0e13);
}

.pc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start; /* a short "Running now" list is not stretched into an empty box */
  gap: 16px;
  padding: 0 var(--gutter);
}

.status-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
}

.status-row + .status-row {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.status-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-2);
}

.status-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.status-value {
  font-weight: 550;
}

.status-value .muted {
  color: var(--text-2);
  font-weight: 400;
}

.addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.running-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.running-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  margin: 0 -10px;
  border-radius: 12px;
}

.running-thumb {
  position: relative;
  width: 44px;
  flex: none;
  border-radius: 7px;
  overflow: hidden;
}

.running-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.running-title {
  font-weight: 650;
}

a.running-title:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.running-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 13px;
}

.running-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-2);
}

.running-empty .icon {
  color: var(--text-3);
}

@media (max-width: 1199px) {
  .desktop-card {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    padding: 36px;
  }

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

@media (max-width: 719px) {
  .desktop-card {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    margin-top: 8px;
    padding: 28px 22px;
    border-radius: 20px;
  }

  .desktop-art {
    grid-column: 1;
    grid-row: 1;
    padding: 0 12%;
  }

  .desktop-body {
    grid-row: 2;
  }

  .desktop-actions .btn {
    width: 100%;
  }
}

/* =========================================================== settings ===== */

.settings {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
  padding: 10px var(--gutter) 0;
}

.settings-head {
  margin-bottom: 14px;
}

.settings-head .t-caption {
  margin-top: 4px;
}

.settings-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-panel {
  padding: 4px 24px;
}

.setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding: 18px 0;
}

.setting + .setting,
.source-list + .setting,
.setting + .hidden-list {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.setting-stack {
  flex-wrap: wrap;
}

.setting-text {
  min-width: 0;
  flex: 1 1 260px;
}

.setting-label {
  font-weight: 650;
}

.setting-desc {
  margin-top: 2px;
  color: var(--text-2);
  font-size: 14px;
}

.setting-note {
  max-width: 64ch;
}

.setting-control {
  flex: none;
  max-width: 100%;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 0 20px;
}

.source-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 12px;
  background: var(--surface);
}

.source-item.is-missing {
  opacity: 0.62;
}

.source-count {
  font-size: 14px;
  font-weight: 600;
}

.hidden-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0 14px;
}

.hidden-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}

.hidden-thumb {
  position: relative;
  width: 32px;
  flex: none;
  border-radius: 6px;
  overflow: hidden;
}

.hidden-title {
  flex: 1;
  font-weight: 600;
}

.about {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 40px;
  padding: 22px 24px;
}

.about-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.about-name {
  font: 700 20px/1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.about-facts {
  display: flex;
  gap: 40px;
}

.about-facts dd {
  margin-top: 4px;
  font-weight: 600;
}

@media (max-width: 719px) {
  .settings-panel {
    padding: 4px 18px;
  }

  .setting {
    flex-wrap: wrap;
  }

  .setting-control {
    width: 100%;
  }

  .setting-control:has(> .switch) {
    width: auto;
  }

  .setting-control > .segmented {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    width: 100%;
  }
}

/* ======================================================= launch prompt ===== */

.prompt {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--safe-top) var(--gutter) var(--safe-bottom);
  background: var(--bg);
  overflow: hidden;
  animation: fade-in var(--dur-slow) var(--ease);
}

/* The page underneath does not scroll, or show its scrollbar, behind the
   prompt. Set on body, the value reaches the viewport, and body never becomes
   a scroller of its own (on html it would stop body's overflow-x from
   propagating, and body would scroll instead). */
body:has(> .prompt) {
  overflow: hidden;
}

.prompt-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden; /* the enlarged art adds no scrollable overflow to .prompt */
}

.prompt-backdrop .hero-media {
  -webkit-mask-image: none;
  mask-image: none;
  filter: blur(40px) brightness(0.42) saturate(1.25);
  transform: scale(1.12);
}

.prompt-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(var(--bg-rgb), 0.45), rgba(var(--bg-rgb), 0.88));
}

.prompt-backdrop .hero-poster {
  display: none;
}

.prompt-card {
  display: flex;
  align-items: center;
  gap: 40px;
  max-width: 860px;
}

.prompt-cover {
  position: relative;
  width: 220px;
  flex: none;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.prompt-desktop {
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #23324f, #121722);
  color: #c9d6ff;
}

.prompt-desktop .icon {
  width: 64px;
  height: 64px;
  stroke-width: 1.4;
}

.prompt-body .t-label {
  margin-bottom: 12px;
}

.prompt-body h1 {
  margin-bottom: 14px;
  text-wrap: balance;
}

.prompt-body p {
  color: var(--text-2);
  margin-bottom: 28px;
  max-width: 46ch;
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 719px) {
  .prompt-card {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .prompt-cover {
    width: 150px;
  }

  .prompt-actions {
    justify-content: center;
  }
}

/* A phone held sideways (the way the stream wants it) has little height: the
   cover goes beside the text again, smaller, so Play stays on screen. Anything
   still too tall scrolls instead of being cut off. */
.prompt {
  overflow-y: auto;
  place-items: safe center;
}

@media (max-height: 520px) and (orientation: landscape) {
  .prompt-card {
    flex-direction: row;
    text-align: left;
    gap: 28px;
  }

  .prompt-cover {
    width: min(150px, calc((100dvh - 48px) * 2 / 3));
  }

  .prompt-body .t-label {
    margin-bottom: 8px;
  }

  .prompt-body h1 {
    margin-bottom: 8px;
  }

  .prompt-body p {
    margin-bottom: 18px;
  }

  .prompt-actions {
    justify-content: flex-start;
  }
}

/* ============================================================ sign in ===== */

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(24px + var(--safe-top)) 16px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(76, 125, 255, 0.22), transparent 70%),
    radial-gradient(40% 40% at 85% 100%, rgba(60, 207, 142, 0.08), transparent 70%),
    var(--bg);
}

.login-wrap {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.login-card {
  width: 100%;
  padding: 40px 36px 36px;
  border-radius: 24px;
  background: var(--bg-raised);
  box-shadow: var(--shadow-pop), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.login-card .brand {
  margin-bottom: 30px;
}

.brand-large .brand-mark {
  width: 44px;
  height: 44px;
}

.brand-large .brand-name {
  font-size: 23px;
}

.login-title {
  font: 700 28px/1.15 var(--font-display);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.login-lead {
  color: var(--text-2);
  margin-bottom: 28px;
}

.login-card .field-label {
  display: block;
  margin-bottom: 8px;
}

.password-field {
  position: relative;
}

/* 17 px keeps iOS from zooming in when the field gets focus. */
.password-field .text-input {
  height: 54px;
  padding-right: 56px;
  font-size: 17px;
  letter-spacing: 0.02em;
}

.reveal-button {
  position: absolute;
  top: 50%;
  right: 6px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border-radius: 10px;
  color: var(--text-2);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.reveal-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.reveal-button .icon {
  width: 22px;
  height: 22px;
}

[data-on="true"] > .if-off,
[data-on="false"] > .if-on {
  display: none;
}

.login-card .field-hint {
  margin-top: 10px;
  color: var(--warn);
}

.login-card .form-error {
  margin-top: 14px;
  margin-bottom: 0;
}

.btn-block {
  width: 100%;
}

/* 19 px bold: large text, so white on the accent reads well. */
.login-card .btn-block {
  height: 54px;
  margin-top: 24px;
  font-size: 19px;
  font-weight: 700;
}

.login-footnote {
  color: var(--text-2);
  font-size: 14px;
  text-align: center;
}

.login-footnote code {
  white-space: nowrap;
}

@media (max-width: 479px) {
  .login-card {
    padding: 32px 22px 26px;
    border-radius: 20px;
  }
}
