/* Launcher layouts (assets/js/launcher-themes.js): the Systems / Themes tabs, the
   Themes tab's layout picker, and every layout other than the original grid. */

/* ---- Tabs ---- */

.launcher-tabs {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
}
.launcher-tabs [role="tab"] {
  padding: 8px 14px; border: 0; border-radius: 6px; background: transparent;
  color: #8b949e; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.launcher-tabs [role="tab"]:hover { color: #e6edf3; }
.launcher-tabs [role="tab"][aria-selected="true"] { background: #21262d; color: #fff; box-shadow: inset 0 0 0 1px #30363d; }
.launcher-tabs [role="tab"]:focus-visible { outline: 2px solid #58a6ff; outline-offset: 1px; }

/* ---- Themes tab ---- */

.themes-panel { width: 100%; max-width: 1240px; margin: 0 auto; padding-bottom: 48px; }
#themes-panel[hidden], #oss-stage[hidden] { display: none; }
#launcher.oss-themes-open #os-grid, #launcher.oss-themes-open #oss-stage { display: none; }
.themes-head h2 { font-size: 1.1rem; margin-bottom: 4px; }
.themes-head p { color: #8b949e; font-size: 14px; margin-bottom: 16px; }
.themes-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.theme-option {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 12px; border-radius: 14px; background: #161b22; border: 1px solid #30363d;
  color: inherit; font: inherit; cursor: pointer;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.theme-option:hover, .theme-option:focus-visible {
  border-color: #58a6ff; background: #1b2230; transform: translateY(-2px); outline: none;
}
.theme-option[aria-pressed="true"] { border-color: #2ea043; box-shadow: 0 0 0 1px #2ea043; }
.theme-option[aria-pressed="true"]::after {
  content: "In use"; position: absolute; top: 20px; right: 20px; padding: 2px 8px; border-radius: 4px;
  background: #238636; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
}
.theme-name { font-weight: 700; margin-top: 4px; }
.theme-text { font-size: 13px; color: #8b949e; line-height: 1.4; }
@media (max-width: 520px) {
  .themes-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .theme-option { padding: 8px; border-radius: 12px; }
  .theme-name { font-size: 14px; }
  .theme-text { font-size: 12px; }
  .theme-option[aria-pressed="true"]::after { top: 14px; right: 14px; }
}

/* Thumbnails, drawn from empty <i> elements */
.theme-thumb {
  position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: 9px; background: #0d1117;
}
.theme-thumb i { display: block; }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8%; padding: 12% 10%; background: #0a0e17; }
.thumb-grid i {
  border-radius: 4px; border: 1px solid #30363d;
  background: linear-gradient(#e9eef3, #e9eef3) 14% 20% / 28% 36% no-repeat,
    linear-gradient(#30363d, #30363d) 14% 80% / 72% 12% no-repeat, #161b22;
}

.thumb-coverflow {
  display: flex; align-items: center; justify-content: center; padding-bottom: 10%;
  perspective: 240px; background: radial-gradient(120% 80% at 50% 0%, #34373d, #000 70%);
}
.thumb-coverflow i {
  flex: none; width: 24%; aspect-ratio: 1; margin: 0 -5%; border-radius: 3px;
  background: linear-gradient(160deg, #fff, #d5dde4);
  -webkit-box-reflect: below 2px linear-gradient(transparent 55%, rgba(255, 255, 255, 0.35));
}
.thumb-coverflow i:nth-child(1), .thumb-coverflow i:nth-child(2) { transform: rotateY(64deg) scale(0.85); }
.thumb-coverflow i:nth-child(3) { position: relative; z-index: 1; margin: 0 2%; }
.thumb-coverflow i:nth-child(4), .thumb-coverflow i:nth-child(5) { transform: rotateY(-64deg) scale(0.85); }

.thumb-channels {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr);
  gap: 5%; padding: 8% 12% 17%; background: linear-gradient(#fdfefe, #e3e9ee);
}
.thumb-channels i { border-radius: 5px; border: 1px solid #c9d2da; background: linear-gradient(#fff, #edf1f4); }
.thumb-channels i:first-child { border-color: #34beed; box-shadow: 0 0 0 1px #34beed; }
.thumb-channels::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12%;
  border-top: 1px solid #c9d2da; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: #eef2f5;
}

.thumb-ps4 {
  display: flex; align-items: flex-start; gap: 3%; padding: 14% 0 0 6%;
  background: radial-gradient(130% 90% at 15% 0%, #2a6fd6, #0b2c6b 55%, #06163a);
}
.thumb-ps4 i { flex: none; width: 15%; aspect-ratio: 1; border-radius: 2px; background: rgba(255, 255, 255, 0.24); }
.thumb-ps4 i:first-child { width: 24%; background: rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 1.5px #fff; }
.thumb-ps4::after {
  content: ""; position: absolute; left: 6%; top: 64%; width: 40%; height: 5%; border-radius: 2px;
  background: rgba(255, 255, 255, 0.8); box-shadow: 0 9px 0 -1px rgba(255, 255, 255, 0.35);
}

.thumb-xmb { background: linear-gradient(160deg, #3d70c9, #13306b 60%, #08183a); }
.thumb-xmb::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 56%; height: 34%;
  border-top: 2px solid rgba(255, 255, 255, 0.35); border-radius: 50%; transform: rotate(-5deg);
}
.thumb-xmb i { position: absolute; top: 22%; width: 8%; aspect-ratio: 1; border-radius: 30%; background: rgba(255, 255, 255, 0.55); }
.thumb-xmb i:nth-child(1) { left: 8%; }
.thumb-xmb i:nth-child(2) { left: 22%; top: 19%; width: 11%; background: #fff; }
.thumb-xmb i:nth-child(3) { left: 39%; }
.thumb-xmb i:nth-child(4) { left: 53%; }
.thumb-xmb i:nth-child(5) { left: 67%; }
.thumb-xmb i:nth-child(n+6) { left: 24%; width: 7%; }
.thumb-xmb i:nth-child(6) { top: 46%; width: 9%; left: 23%; background: #fff; }
.thumb-xmb i:nth-child(7) { top: 64%; }
.thumb-xmb i:nth-child(8) { top: 78%; }
.thumb-xmb i:nth-child(n+6)::after {
  content: ""; position: absolute; left: 150%; top: 30%; width: 420%; height: 40%;
  border-radius: 2px; background: rgba(255, 255, 255, 0.5);
}

.thumb-metro {
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(3, 1fr);
  grid-auto-flow: column dense; gap: 4%; padding: 12% 8%; background: #1b1036;
}
.thumb-metro i { background: #0063b1; }
.thumb-metro i:nth-child(1) { grid-column: span 2; grid-row: span 2; background: #107c10; }
.thumb-metro i:nth-child(2) { background: #c30052; }
.thumb-metro i:nth-child(3) { grid-column: span 2; background: #6b2fbf; }
.thumb-metro i:nth-child(4) { background: #00838f; }
.thumb-metro i:nth-child(5) { background: #b8460b; }
.thumb-metro i:nth-child(6) { grid-row: span 2; }
.thumb-metro i:nth-child(7) { background: #ad1457; }

.thumb-metro360 { background: linear-gradient(160deg, #5a5a5a, #1a1a1a 70%); }
.thumb-metro360 i { position: absolute; top: 18%; bottom: 18%; width: 10%; border-radius: 3px; background: linear-gradient(#d7d7d7, #8e8e8e); }
.thumb-metro360 i:nth-child(1) { left: 10%; }
.thumb-metro360 i:nth-child(2) { left: 24%; width: 28%; background: linear-gradient(#f2f2f2, #bdbdbd); }
.thumb-metro360 i:nth-child(3) { left: 56%; }
.thumb-metro360 i:nth-child(4) { left: 70%; }
.thumb-metro360 i:nth-child(5) { left: 84%; width: 6%; background: #67e089; }

.thumb-mobile { background: radial-gradient(circle at 30% 20%, #3a3f55, #11131c 70%); }
.thumb-mobile::before {
  content: ""; position: absolute; left: 50%; top: 6%; bottom: 6%; aspect-ratio: 9 / 19.5;
  transform: translateX(-50%); border-radius: 12px; border: 3px solid #0b0b0f; box-shadow: 0 0 0 1px #4a4d57;
  background: linear-gradient(160deg, #ff8a5c, #6a5cff 55%, #1b2a6b);
}
.thumb-mobile i { position: absolute; z-index: 1; left: 40.4%; top: 15%; width: 4.4%; aspect-ratio: 1; border-radius: 28%; background: #fff; }
.thumb-mobile i:nth-child(4n+2) { left: 46.2%; }
.thumb-mobile i:nth-child(4n+3) { left: 52%; }
.thumb-mobile i:nth-child(4n+4) { left: 57.8%; }
.thumb-mobile i:nth-child(n+5) { top: 30%; }
.thumb-mobile i:nth-child(n+9) { top: 45%; }
.thumb-mobile i:nth-child(13) {
  left: 39.6%; top: 79%; width: 21%; height: 9%; aspect-ratio: auto; border-radius: 4px;
  background: rgba(255, 255, 255, 0.4);
}

/* ---- Every layout but the grid fills the window: title, search, upload and tabs share
   one bar above the layout, and the footer stays below it ---- */

#launcher.oss-alt.active {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand search upload tabs" "stage stage stage stage" "foot foot foot foot";
  column-gap: 10px; align-items: center;
  position: relative; height: 100vh; height: 100dvh; min-height: 0; padding: 0; overflow: hidden;
}
#launcher.oss-alt .top { grid-area: brand; margin: 0; padding: 10px 4px 10px 18px; text-align: left; }
#launcher.oss-alt .top h1 { font-size: 1.15rem; white-space: nowrap; }
#launcher.oss-alt .top p { display: none; }
#launcher.oss-alt .toolbar { display: contents; }
#launcher.oss-alt #os-search { grid-area: search; justify-self: end; width: 100%; max-width: 440px; min-width: 0; padding: 9px 14px; }
#launcher.oss-alt .upload-btn { grid-area: upload; padding: 9px 14px; }
#launcher.oss-alt .launcher-tabs { grid-area: tabs; margin-right: 18px; }
#launcher.oss-alt .launcher-tabs [role="tab"] { padding: 6px 12px; }
#launcher.oss-alt #os-grid { display: none; }
#launcher.oss-alt #oss-stage, #launcher.oss-alt #themes-panel { grid-area: stage; align-self: stretch; min-width: 0; min-height: 0; }
#launcher.oss-alt #themes-panel { max-width: none; overflow-y: auto; padding: 8px max(18px, calc((100% - 1240px) / 2)) 24px; }
#launcher.oss-alt footer { grid-area: foot; padding: 6px 16px 8px; font-size: 12px; }
.oss-stage { position: relative; overflow: hidden; }

@media (max-width: 820px) {
  #launcher.oss-alt.active {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "brand tabs" "search upload" "stage stage" "foot foot";
    row-gap: 6px;
  }
  #launcher.oss-alt .top { padding: 8px 0 0 12px; }
  #launcher.oss-alt .top h1 { font-size: 1rem; }
  #launcher.oss-alt #os-search { justify-self: stretch; width: auto; max-width: none; margin-left: 12px; }
  #launcher.oss-alt .upload-btn { margin-right: 12px; padding: 9px 12px; font-size: 13px; }
  #launcher.oss-alt .launcher-tabs { margin: 8px 12px 0 0; }
  #launcher.oss-alt footer { padding: 4px 10px 6px; font-size: 11px; }
}

/* Light text and see-through controls over the darker layouts */
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) { color: #fff; }
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) #os-search {
  background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.24); color: #fff;
}
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) #os-search::placeholder { color: rgba(255, 255, 255, 0.65); }
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) .launcher-tabs {
  background: rgba(0, 0, 0, 0.3); border-color: rgba(255, 255, 255, 0.18);
}
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) .launcher-tabs [role="tab"] { color: rgba(255, 255, 255, 0.72); }
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) .launcher-tabs [role="tab"][aria-selected="true"] {
  background: rgba(255, 255, 255, 0.18); color: #fff; box-shadow: none;
}
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) footer { color: rgba(255, 255, 255, 0.62); }
#launcher:is(.oss-layout-coverflow, .oss-layout-ps4, .oss-layout-xmb, .oss-layout-metro, .oss-layout-metro360, .oss-layout-mobile) footer button.link { color: #a8cfff; }
#launcher.oss-alt .theme-option { background: rgba(13, 17, 23, 0.78); border-color: rgba(255, 255, 255, 0.16); color: #e6edf3; }
#launcher.oss-alt .theme-option:hover, #launcher.oss-alt .theme-option:focus-visible { border-color: #58a6ff; background: rgba(27, 34, 48, 0.92); }
#launcher.oss-alt .theme-option[aria-pressed="true"] { border-color: #2ea043; }
#launcher.oss-alt .themes-head p, #launcher.oss-alt .theme-text { color: rgba(230, 237, 243, 0.78); }

/* ---- Pieces the layouts share ---- */

.oss-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.oss-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  background: #1f6feb; color: #fff; padding: 2px 8px; border-radius: 4px;
}
.oss-badge-instant { background: #238636; }
.oss-badge-slow { background: #6e4a1f; }
.oss-badge-stream { background: #8250df; }
.oss-badge-net { background: #0e6e6e; }
.oss-details { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.oss-details-name { font-size: 1.5rem; font-weight: 600; line-height: 1.2; }
.oss-details-meta { font-size: 13px; opacity: 0.78; }
.oss-details-desc {
  font-size: 14px; line-height: 1.5; max-width: 62ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.oss-start {
  margin-top: 4px; padding: 8px 24px; border-radius: 999px; border: 0;
  background: #238636; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.oss-start:hover { background: #1c6a2b; }
.oss-start:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.oss-empty { padding: 32px 16px; text-align: center; opacity: 0.85; }

/* ---- Cover Flow ---- */

#launcher.oss-layout-coverflow { background: radial-gradient(120% 75% at 50% 0%, #2c2f35 0%, #0c0d10 55%, #000 100%); }
.cf { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
.cf-viewport {
  position: relative; overflow: hidden; touch-action: none; user-select: none; cursor: grab;
  perspective: calc(var(--cf-size, 200px) * 4.2); perspective-origin: 50% 42%;
}
.cf.is-dragging .cf-viewport { cursor: grabbing; }
.cf-track { position: absolute; left: 50%; top: 42%; transform-style: preserve-3d; }
.cf-item {
  position: absolute; left: calc(var(--cf-size) / -2); top: calc(var(--cf-size) / -2);
  width: var(--cf-size); height: var(--cf-size); padding: 0; border: 0; background: none;
  cursor: pointer; transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.25, 1), opacity 0.3s;
}
.cf.is-dragging .cf-item { transition: none; }
.cf-face {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 6px;
  background: linear-gradient(160deg, #ffffff, #dbe2e8);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}
.cf-icon { width: 66%; height: 66%; object-fit: contain; }
/* The reflection: a flipped copy below the cover that fades out. */
.cf-mirror {
  top: calc(100% + 3px); bottom: auto; height: 100%; transform: scaleY(-1);
  box-shadow: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 55%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 55%);
}
.cf-item:focus-visible { outline: none; }
.cf-item:focus-visible .cf-face:first-child { box-shadow: 0 0 0 3px #58a6ff, 0 12px 30px rgba(0, 0, 0, 0.6); }
.cf-caption { display: flex; justify-content: center; min-height: 150px; padding: 0 20px 4px; text-align: center; }
.cf-details { align-items: center; max-width: 720px; }
.cf-details .oss-details-desc { -webkit-line-clamp: 2; }
.cf-slider { justify-self: center; width: min(560px, 70%); margin: 2px 0 12px; accent-color: #a7b0bc; }
.cf-slider[hidden] { display: none; }
.cf.is-empty .cf-caption { align-items: center; }

/* ---- Channels (Wii-style) ---- */

#launcher.oss-layout-channels {
  color: #3c4650;
  background: repeating-linear-gradient(0deg, rgba(0, 40, 80, 0.025) 0 1px, transparent 1px 4px), linear-gradient(#fdfefe, #e6ecf0);
}
#launcher.oss-layout-channels .top h1 { color: #4a5560; }
#launcher.oss-layout-channels .top h1 span { color: #1a9fd4; }
#launcher.oss-layout-channels #os-search { background: #fff; border-color: #c9d2da; color: #2c343c; }
#launcher.oss-layout-channels .launcher-tabs { background: #fff; border-color: #c9d2da; }
#launcher.oss-layout-channels .launcher-tabs [role="tab"] { color: #6b7782; }
#launcher.oss-layout-channels .launcher-tabs [role="tab"][aria-selected="true"] { background: #e3f6fd; color: #136f96; box-shadow: inset 0 0 0 1px #9fdcf3; }
#launcher.oss-layout-channels footer { color: #6b7782; }
#launcher.oss-layout-channels footer button.link { color: #136f96; }
#launcher.oss-layout-channels .theme-option { background: #fff; border-color: #d3dbe2; color: #3c4650; }
#launcher.oss-layout-channels .theme-option:hover, #launcher.oss-layout-channels .theme-option:focus-visible { background: #f5fbfe; border-color: #34beed; }
#launcher.oss-layout-channels .themes-head p, #launcher.oss-layout-channels .theme-text { color: #6b7782; }

.ch { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.ch-viewport { position: relative; overflow: hidden; margin: 0 70px; touch-action: none; user-select: none; }
.ch-strip { display: flex; width: 100%; height: 100%; transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); }
.ch.is-dragging .ch-strip { transition: none; }
.ch-page {
  flex: 0 0 100%; min-width: 0; display: grid;
  grid-template-columns: repeat(var(--ch-cols, 4), minmax(0, 1fr));
  grid-template-rows: repeat(var(--ch-rows, 3), minmax(0, 1fr));
  gap: clamp(10px, 2vw, 22px); padding: clamp(8px, 2.5vh, 22px) 6px;
}
.ch-tile, .ch-slot { min-height: 0; border-radius: 24px; }
.ch-slot { border: 2px solid rgba(150, 168, 182, 0.3); background: rgba(255, 255, 255, 0.4); }
.ch-tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 10px 8px;
  border: 3px solid #d3dbe2; background: linear-gradient(#ffffff, #f0f3f6 55%, #e3e9ee);
  box-shadow: 0 2px 6px rgba(60, 80, 100, 0.12), inset 0 1px 0 #fff;
  color: #4a5560; font: inherit; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ch-tile:hover, .ch-tile:focus-visible {
  border-color: #34beed; outline: none; transform: scale(1.03);
  box-shadow: 0 0 0 3px rgba(52, 190, 237, 0.35), 0 4px 14px rgba(40, 120, 160, 0.25);
}
.ch-screen { position: relative; flex: 1; width: 100%; min-height: 0; }
.ch-icon { position: absolute; left: 25%; top: 6%; width: 50%; height: 88%; object-fit: contain; }
.ch-name { max-width: 100%; font-size: 13px; font-weight: 600; color: #56616c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-arrow {
  position: absolute; top: calc(50% - 64px); width: 50px; height: 50px; border-radius: 50%;
  border: 2px solid #c9d6df; background: radial-gradient(circle at 50% 35%, #fff, #e4f1f8);
  box-shadow: 0 2px 8px rgba(40, 120, 160, 0.2); cursor: pointer;
}
.ch-arrow[hidden] { display: none; }
.ch-prev { left: 10px; }
.ch-next { right: 10px; }
.ch-arrow::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px;
  border: solid #1a9fd4; border-width: 0 0 4px 4px; border-radius: 2px;
  transform: translate(-30%, -50%) rotate(45deg);
}
.ch-next::before { transform: translate(-75%, -50%) rotate(-135deg); }
.ch-arrow:hover, .ch-arrow:focus-visible { border-color: #34beed; outline: none; box-shadow: 0 0 0 3px rgba(52, 190, 237, 0.35); }
.ch-bar {
  position: relative; display: flex; align-items: center; justify-content: center; height: 72px;
  border-top: 2px solid #c9d3db; border-radius: 50% 50% 0 0 / 30px 30px 0 0;
  background: linear-gradient(#f6f8fa, #dfe6eb);
}
.ch-clock { display: flex; flex-direction: column; align-items: center; line-height: 1.15; color: #7d8a95; }
.ch-time { font-size: 1.6rem; font-weight: 300; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; }
.ch-date { font-size: 0.8rem; }
.ch-dots { position: absolute; right: 26px; display: flex; gap: 2px; }
.ch-dots[hidden] { display: none; }
.ch-dot {
  box-sizing: content-box; width: 9px; height: 9px; padding: 6px; border: 0; border-radius: 50%;
  background: #c3ced7; background-clip: content-box; cursor: pointer;
}
.ch-dot[aria-current] { background-color: #34beed; }
.ch-dot:focus-visible { outline: 2px solid #34beed; outline-offset: -2px; }
.ch .oss-empty { align-self: center; width: 100%; color: #6b7782; }

@media (max-width: 760px) {
  .ch-viewport { margin: 0 12px; }
  .ch-arrow { top: auto; bottom: 11px; width: 44px; height: 44px; z-index: 1; }
  .ch-dots { right: auto; left: 50%; bottom: 4px; transform: translateX(-50%); }
  .ch-clock { margin-bottom: 14px; }
}

/* ---- PS4-style ---- */

#launcher.oss-layout-ps4 { background: radial-gradient(130% 90% at 15% 0%, #1f63c6 0%, #0d3680 38%, #071d4d 70%, #04112e 100%); }
.ps { position: absolute; inset: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr); overflow: hidden; touch-action: none; }
.ps-top { display: flex; justify-content: space-between; gap: 16px; padding: 10px clamp(16px, 7vw, 110px) 8px; font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.ps-time { font-variant-numeric: tabular-nums; }
.ps-viewport { position: relative; height: calc(var(--ps-tile, 120px) * 1.5 + 8px); user-select: none; }
.ps-row {
  position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: var(--ps-gap, 12px);
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.ps.is-dragging .ps-row { transition: none; }
.ps-tile {
  position: relative; flex: none; width: var(--ps-tile); height: var(--ps-tile); padding: 0; overflow: hidden;
  border: 0; border-radius: 3px; background: linear-gradient(150deg, var(--ps-a, #3b82d6), var(--ps-b, #18427f));
  color: #fff; font: inherit; cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: width 0.3s ease, height 0.3s ease, box-shadow 0.3s;
}
.ps-mac { --ps-a: #8b6fd6; --ps-b: #3d2c7a; }
.ps-linux { --ps-a: #2fa77a; --ps-b: #11553d; }
.ps-unix { --ps-a: #d0574e; --ps-b: #6e1f1f; }
.ps-other { --ps-a: #d88a34; --ps-b: #7a4210; }
.ps-icon {
  position: absolute; left: 50%; top: 42%; width: 50%; height: 50%; padding: 7%; object-fit: contain;
  transform: translate(-50%, -50%); border-radius: 18%; background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.ps-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 6px; text-align: left;
  font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.ps-tile.is-current { width: calc(var(--ps-tile) * 1.5); height: calc(var(--ps-tile) * 1.5); box-shadow: 0 0 0 3px #fff, 0 12px 30px rgba(0, 0, 0, 0.5); }
.ps-tile.is-current .ps-name { font-size: 13px; }
.ps-tile:focus-visible { outline: none; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #4ea3ff, 0 12px 30px rgba(0, 0, 0, 0.5); }
.ps-info { padding: 14px clamp(16px, 7vw, 110px) 10px; overflow: hidden; }
.ps-details .oss-details-name { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 300; }
.ps-details .oss-start {
  margin-top: 8px; padding: 9px 30px; border-radius: 4px;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.6);
}
.ps-details .oss-start:hover { background: rgba(255, 255, 255, 0.24); }

/* ---- XMB (PSP/PS3-style) ---- */

/* The canvas behind everything in the launcher draws the waves. */
#launcher.oss-layout-xmb { isolation: isolate; background: #10295a; }
.xmb-waves { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.xmb { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; }
.xmb-cats {
  position: absolute; left: 0; top: calc(var(--xmb-row, 150px) - var(--xmb-cat, 64px) / 2); display: flex;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.xmb-cat {
  flex: none; width: var(--xmb-cat-w); display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 0; border: 0; background: none; color: #fff; font: inherit; cursor: pointer; opacity: 0.55;
  transition: opacity 0.3s;
}
.xmb-cat-icon {
  width: var(--xmb-cat); height: var(--xmb-cat); object-fit: contain; transform: scale(0.7);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45)); transition: transform 0.3s;
}
.xmb-cat-name { font-size: 15px; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); opacity: 0; transition: opacity 0.3s; }
.xmb-cat:hover { opacity: 0.85; }
.xmb-cat.is-current { opacity: 1; }
.xmb-cat.is-current .xmb-cat-icon { transform: none; filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.5)); }
.xmb-cat.is-current .xmb-cat-name { opacity: 1; }
/* The list spans the whole layout, over the family row too; only its rows take clicks. */
.xmb-list, .xmb-rows { position: absolute; inset: 0; }
.xmb-list { pointer-events: none; }
.xmb-item {
  position: absolute; top: 0; left: calc(var(--xmb-x) - var(--xmb-cat) / 2); right: 16px;
  display: grid; grid-template-columns: var(--xmb-cat) minmax(0, 1fr); align-items: center; column-gap: 16px;
  height: var(--xmb-item); padding: 0; border: 0; background: none; color: #fff; font: inherit; text-align: left;
  cursor: pointer; opacity: 0.82; pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s;
}
.xmb-item.is-before { opacity: 0.5; }
.xmb-item:hover { opacity: 1; }
.xmb-art { display: grid; place-items: center; height: 100%; }
.xmb-icon {
  width: calc(var(--xmb-item) * 0.76); height: calc(var(--xmb-item) * 0.76); object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45)); transition: width 0.3s, height 0.3s;
}
.xmb-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }
.xmb-name { max-width: 100%; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xmb-meta, .xmb-desc, .xmb-item .oss-badges { display: none; }
.xmb-item.is-current { opacity: 1; align-items: start; height: calc(var(--xmb-item) * 2.4); }
.xmb-item.is-current .xmb-art { height: var(--xmb-cat); }
.xmb-item.is-current .xmb-icon { width: var(--xmb-cat); height: var(--xmb-cat); filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.45)); }
.xmb-item.is-current .xmb-name { font-size: 21px; }
.xmb-item.is-current .xmb-meta { display: block; font-size: 13px; opacity: 0.88; }
.xmb-item.is-current .oss-badges { display: flex; text-shadow: none; }
.xmb-item.is-current .xmb-desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 62ch; font-size: 13px; line-height: 1.4; opacity: 0.92;
}
.xmb-item:focus-visible { outline: none; }
.xmb-item:focus-visible::before {
  content: ""; position: absolute; inset: -6px -8px; z-index: -1; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.xmb .oss-empty { position: absolute; left: 0; right: 0; top: 45%; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7); }

/* ---- Metro 8.1 (Windows 8-style) ---- */

#launcher.oss-layout-metro { background: #1b1036; }
#launcher.oss-layout-metro #os-search, #launcher.oss-layout-metro .upload-btn,
#launcher.oss-layout-metro .launcher-tabs, #launcher.oss-layout-metro .launcher-tabs [role="tab"] { border-radius: 0; }
.mt { position: absolute; inset: 0; overflow: hidden; }
.mt-backdrop {
  position: absolute; top: 0; bottom: 0; left: 0; width: 300%; pointer-events: none;
  background:
    radial-gradient(circle at 10% 30%, rgba(122, 70, 220, 0.45), transparent 22%),
    radial-gradient(circle at 30% 85%, rgba(0, 120, 215, 0.32), transparent 20%),
    radial-gradient(circle at 55% 15%, rgba(195, 0, 82, 0.24), transparent 18%),
    radial-gradient(circle at 80% 70%, rgba(0, 131, 143, 0.3), transparent 22%),
    linear-gradient(115deg, #1b1036, #251552 50%, #1b1036);
}
.mt-pano {
  position: absolute; inset: 0; display: flex; gap: 56px; padding: 4px 48px 12px;
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; touch-action: pan-x;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.4) transparent;
}
.mt.is-dragging .mt-pano { cursor: grabbing; user-select: none; }
.mt-group { flex: none; display: flex; flex-direction: column; }
.mt-head { height: 34px; margin: 0 0 10px 2px; font-size: 1.4rem; font-weight: 300; white-space: nowrap; }
.mt-tiles {
  display: grid; grid-auto-flow: column dense; gap: var(--mt-gap, 8px);
  grid-template-rows: repeat(var(--mt-rows, 3), var(--mt-unit, 110px)); grid-auto-columns: var(--mt-unit, 110px);
}
.mt-tile {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; overflow: hidden;
  padding: 8px 10px; border: 0; border-radius: 0; background: var(--mt-color, #0063b1); color: #fff;
  font: inherit; text-align: left; cursor: pointer; scroll-margin-inline: 64px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.mt-tile:hover { box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.45); }
.mt-tile:active { transform: scale(0.97); }
.mt-tile:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mt-wide { grid-column: span 2; justify-content: center; padding-left: 46%; }
.mt-large { grid-column: span 2; grid-row: span 2; padding: 14px; }
.mt-icon { position: absolute; left: 50%; top: 40%; width: 46%; height: 46%; object-fit: contain; transform: translate(-50%, -50%); filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35)); }
.mt-wide .mt-icon { left: 23%; top: 50%; width: 30%; height: 62%; }
.mt-large .mt-icon { left: 14px; top: 14px; width: 34%; height: 34%; transform: none; }
.mt-name { font-size: 12px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-wide .mt-name, .mt-large .mt-name {
  font-size: 16px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.mt-large .mt-name { font-size: 19px; }
.mt-meta { font-size: 12px; opacity: 0.82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-desc {
  order: -1; margin-bottom: 6px; font-size: 12px; line-height: 1.4; opacity: 0.92;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mt .oss-empty { margin: auto; }
@media (max-width: 600px) {
  .mt-pano { gap: 32px; padding: 4px 16px 12px; }
}

/* ---- Metro 360: blade dashboard. Brushed silver panels, a green highlight, a guide orb. Original art. ---- */

#launcher.oss-layout-metro360 { background: #050505; }
.x360 { position: absolute; inset: 0; color: #1a1a1a; }
.x360-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 42%, #4a4a4a 0%, #1a1a1a 58%, #050505 100%);
}
.x360-blades {
  position: absolute; left: 108px; right: 36px; top: 7%; bottom: 12%;
  display: flex; gap: 12px; align-items: stretch; min-width: 0;
}
.x360-blade {
  position: relative; display: flex; flex: 0 0 58px; min-width: 0; overflow: hidden; border-radius: 2px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), transparent 14%, transparent 86%, rgba(0, 0, 0, 0.35)),
    linear-gradient(180deg, #ffffff 0%, #e4e4e4 16%, #b7b7b7 48%, #8a8a8a 78%, #5c5c5c 100%);
  box-shadow:
    inset 0 1px 0 #fff, inset 0 -18px 22px rgba(0, 0, 0, 0.38),
    8px 14px 22px rgba(0, 0, 0, 0.55);
  color: #161616; transition: flex-basis 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.x360-blade::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 28%; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.55), transparent);
}
.x360-blade::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px; pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.15));
}
.x360-blade.is-on { flex: 1 1 0; }
.x360-tab {
  position: relative; z-index: 1; flex: none; align-self: center; width: 58px; max-height: 80%;
  border: 0; background: transparent; color: inherit;
  font: inherit; font-weight: 600; font-size: 15px; letter-spacing: 0.08em; cursor: pointer;
  writing-mode: vertical-rl; transform: rotate(180deg);
}
.x360-tab:focus-visible { outline: 2px solid #0c7a28; outline-offset: -6px; }
.x360-open {
  position: relative; z-index: 1; flex: 1; display: none; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr);
  min-width: 0; margin: 14px 16px 14px 0; padding: 6px 8px;
  background: transparent;
}
.x360-blade.is-on .x360-open { display: grid; }
.x360-list { overflow: auto; display: flex; flex-direction: column; gap: 2px; min-height: 0; padding-right: 8px; }
.x360-list::-webkit-scrollbar { width: 8px; }
.x360-list::-webkit-scrollbar-thumb { background: linear-gradient(#f2f2f2, #6d6d6d); border-radius: 4px; }
.x360-list::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.12); }
.x360-row, .x360-list .egg-row {
  display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 2px;
  background: transparent; color: #1a1a1a; font: inherit; font-size: 16px; text-align: left;
  padding: 7px 10px; cursor: pointer;
}
.x360-row.is-on, .x360-list .egg-row.is-on {
  background: linear-gradient(180deg, #eafff0 0%, #7dffb0 12%, #22c24e 40%, #0e8a30 72%, #0a6b24 100%);
  color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 16px rgba(40, 220, 80, 0.7);
}
.x360-row:focus-visible, .x360-list .egg-row:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.x360-row-icon { width: 28px; height: 28px; object-fit: contain; }
.x360-row-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x360-detail { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 8px 8px 8px 18px; }
.x360-icon { width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.35)); }
.x360-name { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 500; }
.x360-meta, .x360-desc { margin: 0; font-size: 14px; }
.x360-desc { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.x360-a {
  margin-top: auto; display: inline-flex; align-items: center; gap: 10px; border: 0; background: transparent;
  color: inherit; font: inherit; font-weight: 700; font-size: 18px; cursor: pointer; padding: 4px;
}
.x360-a-key, .x360-hint b {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c8ffd4, #1db84a 45%, #0b6b28);
  color: #fff; font-size: 14px; box-shadow: 0 0 8px rgba(40, 200, 80, 0.7);
}
.x360-guide {
  position: absolute; left: 22px; bottom: 18px; width: 68px; height: 68px; border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #d8ffe4, #2ed15f 36%, #0e7a32 70%, #063d18);
  box-shadow: 0 0 22px rgba(40, 220, 90, 0.85), inset 0 0 0 3px rgba(255, 255, 255, 0.28);
}
.x360-guide::after {
  content: ""; position: absolute; inset: 16px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.9);
}
.x360-guide:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.x360-guidebox {
  position: absolute; left: 104px; bottom: 22px; width: min(380px, calc(100% - 140px)); padding: 16px 18px;
  border-radius: 8px; background: linear-gradient(#242424, #101010); color: #fff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.x360-guidebox[hidden] { display: none; }
.x360-guidebox strong { display: block; margin-bottom: 4px; font-size: 1.1rem; font-weight: 500; }
.x360-clock { font-variant-numeric: tabular-nums; opacity: 0.8; margin-bottom: 8px; }
.x360-guidebox p { margin: 0; font-size: 14px; line-height: 1.4; }
.x360:has(.x360-guidebox:not([hidden])) .x360-hints { visibility: hidden; }
.x360-hints {
  position: absolute; left: 108px; right: 36px; bottom: 16px; display: flex; gap: 22px;
  color: #fff; font-size: 14px; text-shadow: 0 1px 3px #000;
}
.x360-hint { display: inline-flex; align-items: center; gap: 8px; }
.x360 .oss-empty { margin: auto; color: #fff; }
@media (max-width: 800px) {
  .x360-blades { left: 16px; right: 12px; top: 4%; bottom: 16%; gap: 6px; }
  .x360-blade, .x360-tab { flex-basis: 40px; width: 40px; }
  .x360-blade.is-on { flex-basis: 0; }
  .x360-guide { width: 48px; height: 48px; left: 10px; bottom: 8px; }
  .x360-guide::after { inset: 11px; }
  .x360-hints { display: none; }
  .x360-open { grid-template-columns: 1fr; margin: 6px; }
  .x360-list { max-height: 42%; }
}
@media (prefers-reduced-motion: reduce) {
  .x360-blade { transition: none; }
}

/* Pretend installers. Each one fills the window in that console's own screen. */
.egg {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: #000; color: #fff; overflow: hidden;
}
body:has(dialog.egg[open]) { overflow: hidden; }
.egg::backdrop { background: #000; }
.egg:focus { outline: none; }
.egg-scene { position: absolute; inset: 0; }
.egg .x360 {
  background: radial-gradient(ellipse 70% 60% at 50% 42%, #4a4a4a 0%, #1a1a1a 58%, #050505 100%);
}
.egg-row {
  display: block; width: 100%; margin: 0; padding: 4px 8px; border: 0; background: transparent;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.egg-row:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }

/* HackMii-style text screen: black, a plain list, a highlight on the line that is selected. */
.hm {
  position: absolute; inset: 0; padding: 8vh 10vw; overflow: auto;
  background: #000; color: #f2f2f2;
  font: 20px/1.55 ui-monospace, "Cascadia Mono", "Lucida Console", monospace;
}
.hm-title { margin: 0 0 1.2em; font: inherit; font-size: 22px; }
.hm p { margin: 0 0 0.4em; }
.hm-status { margin: 1.4em 0 1.6em; }
.hm-foot { position: absolute; left: 10vw; bottom: 6vh; margin: 0; color: #c8c8c8; }
.hm .egg-rows { width: min(36rem, 100%); }
.hm .egg-row { padding: 2px 10px; }
.hm .egg-row.is-on { background: #d0d0d0; color: #111; }
.hm-label { margin: 2em 0 0.8em; }
.hm-track { width: min(420px, 70%); height: 18px; border: 2px solid #f2f2f2; }
.hm-track > span { display: block; height: 100%; width: 0; background: #f2f2f2; }

/* GoldHEN, in the PS4-style screen: a centred install, then the top-right notification. */
.gh {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(130% 90% at 15% 0%, #1f63c6 0%, #0d3680 38%, #071d4d 70%, #04112e 100%);
  font-family: "Segoe UI", sans-serif; text-align: center;
}
.gh-mark, .gh-note-icon {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 16px;
  background: linear-gradient(#f6d36b, #c48a12); color: #2a2108; font-weight: 700; letter-spacing: 0.04em;
}
.gh h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 300; }
.gh-label { margin: 0; font-size: 18px; opacity: 0.9; }
.gh-track { width: min(460px, 72vw); height: 4px; background: rgba(255, 255, 255, 0.28); }
.gh-track > span { display: block; height: 100%; width: 0; background: #fff; }
.gh-pct { min-height: 1.2em; font-variant-numeric: tabular-nums; }
.gh-prompt { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; }
.gh-x, .hfw-x, .hfw-o {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid #fff; font-size: 13px;
}
.gh-note {
  position: absolute; top: 28px; right: 28px; display: flex; gap: 12px; align-items: center; text-align: left;
  width: min(380px, calc(100vw - 40px)); padding: 12px 14px; border-radius: 8px; background: rgba(22, 22, 22, 0.94);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45); animation: gh-in 0.35s ease both;
}
.gh-note-icon { width: 48px; height: 48px; border-radius: 8px; flex: none; }
.gh-note strong, .gh-note span { display: block; }
.gh-note span { font-size: 15px; }
.gh-note p { margin: 4px 0 0; font-size: 13px; opacity: 0.75; }
@keyframes gh-in { from { opacity: 0; transform: translateY(-12px); } }

/* PS3-style system update over the wave background. */
.hfw { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(120% 80% at 50% 120%, #1d5cb8, #0c2458 42%, #071433); }
.hfw::before {
  content: ""; position: absolute; left: -20%; right: -20%; bottom: -10%; height: 46%;
  background: repeating-radial-gradient(ellipse at 50% 100%, transparent 0 22px, rgba(120, 180, 255, 0.16) 23px 24px);
  animation: hfw-wave 10s linear infinite;
}
@keyframes hfw-wave { to { transform: translateX(-24px); } }
.hfw-win {
  position: absolute; left: 50%; top: 46%; width: min(640px, calc(100% - 48px)); transform: translate(-50%, -50%);
  padding: 22px 26px 18px; border-radius: 10px; background: rgba(6, 16, 40, 0.72); color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 18px 50px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", sans-serif;
}
.hfw-win h2 { margin: 0 0 14px; font-size: 1.35rem; font-weight: 500; }
.hfw-note { margin: 12px 0 0; font-size: 14px; line-height: 1.45; opacity: 0.9; }
.hfw .egg-row { padding: 8px 10px; font-size: 18px; }
.hfw .egg-row.is-on { background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.hfw-label { margin: 0 0 10px; font-size: 18px; }
.hfw-track { height: 22px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hfw-track > span { display: block; height: 100%; width: 0; background: linear-gradient(#7ec0ff, #1d6fd0); }
.hfw-pct { display: block; margin-top: 6px; text-align: right; font-variant-numeric: tabular-nums; }
.hfw-prompts {
  position: absolute; right: 28px; bottom: 22px; display: flex; align-items: center; gap: 8px; font-size: 15px;
}
.hfw-prompts b { margin-left: 10px; }

/* BadUpdate uses the blade screen above, then a plain status log, then an Aurora cover row. */
.bu { position: absolute; inset: 0; padding: 8vh 8vw; background: #000; color: #f4f4f4; font: 18px/1.5 ui-monospace, Consolas, monospace; }
.bu-log { margin: 0 0 24px; white-space: pre-wrap; }
.bu-track { width: min(360px, 70%); height: 8px; background: #222; }
.bu-track > span { display: block; height: 100%; width: 0; background: #3dff7a; }
.au {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 6vh 6vw; background: radial-gradient(80% 80% at 50% 40%, #1a1c22, #07080c 70%);
  font-family: "Segoe UI", sans-serif; text-align: center;
}
.au-title { margin: 0; font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 300; letter-spacing: 0.12em; }
.au-covers { display: flex; align-items: flex-end; justify-content: center; gap: 18px; min-height: 240px; }
.au-cover {
  width: 120px; height: 168px; border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(160deg, hsl(calc(var(--au) * 48) 32% 46%), hsl(calc(var(--au) * 48) 34% 16%));
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.5);
}
.au-cover.is-on { width: 168px; height: 236px; box-shadow: 0 0 0 3px #fff, 0 22px 36px rgba(0, 0, 0, 0.55); }
.au-sub, .au-note { margin: 0; font-size: 18px; }
.au-note { opacity: 0.75; }
.au .egg-rows { width: min(320px, 80vw); }
.au .egg-row { padding: 10px 14px; font-size: 18px; text-align: left; }
.au .egg-row.is-on { background: #147a32; }
.au-track { width: min(420px, 70%); height: 6px; background: rgba(255, 255, 255, 0.15); }
.au-track > span { display: block; height: 100%; width: 0; background: #3dff7a; }
@media (prefers-reduced-motion: reduce) {
  .gh-note, .hfw::before { animation: none; }
}

/* ---- Mobile Mode ---- */

#launcher.oss-layout-mobile { background: radial-gradient(90% 70% at 50% 45%, #2c303d, #0d0f14 72%); }
.mb-screen, #launcher.oss-mobile-fill {
  background:
    radial-gradient(60% 45% at 12% 8%, rgba(255, 150, 100, 0.85), transparent 70%),
    radial-gradient(55% 40% at 92% 35%, rgba(120, 100, 255, 0.8), transparent 70%),
    radial-gradient(70% 50% at 40% 100%, rgba(0, 180, 200, 0.5), transparent 70%),
    linear-gradient(165deg, #2a2f7a, #141638 60%, #0b0c22);
}
.mb { position: absolute; inset: 0; display: grid; place-items: center; }
.mb-device { display: contents; }
.mb.is-framed .mb-device {
  display: block; padding: 11px; border-radius: 54px;
  background: linear-gradient(145deg, #3c3f47, #141518);
  box-shadow: 0 0 0 1px #50535c, inset 0 0 0 2px #0a0a0c, 0 30px 80px rgba(0, 0, 0, 0.6);
}
.mb-screen { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; overflow: hidden; color: #fff; }
#launcher.oss-mobile-fill .mb-screen { background: none; }
.mb.is-framed .mb-screen { border-radius: 43px; }
.mb.is-framed.is-tall .mb-screen::before {
  content: ""; position: absolute; top: 11px; left: 50%; z-index: 2; width: 31%; height: 25px;
  transform: translateX(-50%); border-radius: 13px; background: #000;
}
.mb-status {
  flex: none; display: flex; align-items: flex-end; justify-content: space-between;
  height: var(--mb-status, 6px); padding: 0 8% 5px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.mb:not(.is-framed) .mb-status > * { display: none; }
.mb.is-tall .mb-status { padding-bottom: 9px; }
.mb-glyphs { display: flex; align-items: center; gap: 6px; }
.mb-signal {
  display: block; width: 16px; height: 10px; clip-path: polygon(0 100%, 100% 0, 100% 100%);
  background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 4.3px);
}
.mb-battery {
  position: relative; display: block; width: 22px; height: 11px; border: 1.5px solid rgba(255, 255, 255, 0.92); border-radius: 3px;
  background: linear-gradient(#fff, #fff) 1px 1px / 68% calc(100% - 2px) no-repeat;
}
.mb-battery::after {
  content: ""; position: absolute; top: 2.5px; right: -4.5px; width: 2px; height: 3.5px;
  border-radius: 0 1px 1px 0; background: rgba(255, 255, 255, 0.92);
}
.mb-pages {
  flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
}
.mb-pages::-webkit-scrollbar { display: none; }
.mb.is-dragging .mb-pages { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.mb-page {
  flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always;
  display: grid; grid-template-columns: repeat(var(--mb-cols, 4), minmax(0, 1fr)); grid-template-rows: repeat(var(--mb-rows, 6), minmax(0, 1fr));
  align-items: center; justify-items: center; padding: 8px var(--mb-margin, 20px) 0;
}
.mb-app {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 0; border: 0;
  background: none; color: #fff; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.mb-icon {
  display: grid; place-items: center; width: var(--mb-icon, 60px); height: var(--mb-icon, 60px); border-radius: 23%;
  background: linear-gradient(#ffffff, #e6ecf2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.12s, filter 0.12s;
}
.mb-icon img { width: 78%; height: 78%; object-fit: contain; }
.mb-app:active .mb-icon { transform: scale(0.92); filter: brightness(0.85); }
.mb-app:focus-visible { outline: none; }
.mb-app:focus-visible .mb-icon { box-shadow: 0 0 0 3px #fff, 0 0 0 6px rgba(10, 132, 255, 0.85); }
.mb-label {
  max-width: 100%; font-size: var(--mb-label, 11px); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.mb-dots { flex: none; display: flex; justify-content: center; align-items: center; height: 22px; }
.mb-dots[hidden] { display: flex; visibility: hidden; }
.mb-dot {
  box-sizing: content-box; width: 7px; height: 7px; padding: 5px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.42); background-clip: content-box; cursor: pointer;
}
.mb-dot[aria-current] { background-color: #fff; }
.mb-dot:focus-visible { outline: 2px solid #fff; outline-offset: -1px; }
.mb-dock {
  flex: none; display: flex; justify-content: space-around; align-items: center;
  margin: 0 calc(var(--mb-margin, 20px) * 0.5) var(--mb-bottom, 8px); padding: var(--mb-dock-pad, 12px);
  border-radius: calc(var(--mb-icon, 60px) * 0.45); background: rgba(255, 255, 255, 0.24);
}
.mb-dock[hidden] { display: none; }
.mb-dock .mb-app { width: auto; }
.mb .oss-empty { margin: auto; }
.mb.is-framed.is-tall .mb-screen::after {
  content: ""; position: absolute; bottom: 6px; left: 50%; width: 36%; height: 5px;
  transform: translateX(-50%); border-radius: 3px; background: rgba(255, 255, 255, 0.8);
}

/* ---- Mobile Mode's easter egg: Cydia's first launch, drawn for the site (no Cydia artwork).
   Preparing Filesystem plays on the phone's screen, under its status bar and home indicator;
   then Cydia takes over the whole window in .cy-full, a full-screen modal dialog that
   launcher-themes.js zooms out of the phone and back. Sizes are in em of .cy, which
   launcher-themes.js scales to the space it has. ---- */

.mb-screen:has(> .cy) { isolation: isolate; }
.mb-screen:has(> .cy) .mb-status { position: relative; z-index: 3; }
.mb-screen:has(> .cy.is-light) .mb-status { filter: invert(1); }
.mb-screen:has(> .cy)::after { z-index: 3; }
.mb-screen:has(> .cy.is-light)::after { background: rgba(0, 0, 0, 0.8); }
.mb-screen:has(.cy) .oss-empty { visibility: hidden; }
.cy-full {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; color: inherit; background: transparent;
  transform-origin: 0 0;
}
.cy-full::backdrop { background: transparent; }
.cy-full:focus { outline: none; }
.cy-full .cy { --mb-status: max(6px, env(safe-area-inset-top, 0px)); --mb-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
.cy {
  position: absolute; inset: 0; z-index: 1; overflow: hidden; outline: none; color: #000; text-align: left;
  font: 400 calc(16px * var(--cy-s, 1)) / 1.25 -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
}
.cy [hidden] { display: none !important; }
:where(.cy) button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.cy-scene, .cy-black, .cy-dim { position: absolute; inset: 0; z-index: 0; }
.cy-scene { display: flex; flex-direction: column; }
.cy-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cy-strong { font-weight: 600; }

.cy-spin { position: relative; display: block; flex: none; width: 1.25em; height: 1.25em; color: #fff; animation: cy-spin 1s steps(12) infinite; }
.cy-spin i { position: absolute; left: 45%; top: 0; width: 10%; height: 29%; border-radius: 1em; background: currentColor; transform-origin: 50% 172.4%; }
@keyframes cy-spin { to { transform: rotate(360deg); } }

/* Preparing Filesystem: big caption above the middle, large spinner near the bottom */
.cy-stash { display: block; padding: 0 0.5em; background: linear-gradient(#34363b, #26282c); color: #fff; text-align: center; text-shadow: 0 -1px 0 #000; }
.cy-stash-caption { position: absolute; left: 0; right: 0; top: calc(50% - 2.857em); font-size: 1.75em; font-weight: 700; line-height: 1.43; }
.cy-stash-status { position: absolute; left: 0; right: 0; top: calc(50% - 1.875em); line-height: 1.875; }
.cy .cy-stash-spin { position: absolute; left: calc(50% - 1.156em); top: calc(100% - 5em); width: 2.3125em; height: 2.3125em; }

/* Navigation bar, grouped lists and tab bar in the style of iOS 7 */
.cy-home, .cy-sheet { background: #efeff4; }
.cy-nav {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: calc(var(--mb-status, 6px) + 2.75em); padding: var(--mb-status, 6px) 0.25em 0;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.3); background: rgba(248, 248, 248, 0.97);
}
.cy-nav-title { padding: 0 0.25em; font-size: 1.0625em; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cy-nav-side { display: flex; min-width: 0; }
.cy-nav-side:last-child { justify-content: flex-end; }
.cy-nav-button { padding: 0.45em 0.5em; border-radius: 0.375em; color: #007aff; font-size: 1.0625em; }
.cy-nav-button:active { opacity: 0.4; }
.cy-page { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 1.5em; }
.cy-page, .cy-run-log { scrollbar-width: none; }
.cy-page::-webkit-scrollbar, .cy-run-log::-webkit-scrollbar { display: none; }
.cy-group { max-width: 40em; margin: 2.2em auto 0; }
.cy-group-title { padding: 0 1.15em 0.45em; font-size: 0.8125em; font-weight: 400; text-transform: uppercase; color: #6d6d72; }
.cy-rows { list-style: none; border-block: 0.5px solid #c8c7cc; background: #fff; }
.cy-row { display: flex; align-items: center; gap: 0.5em; min-height: 2.75em; margin-left: 0.9375em; padding: 0.4em 0.9375em 0.4em 0; }
.cy-row + .cy-row { border-top: 0.5px solid #c8c7cc; }
.cy-row-text { flex: 1; min-width: 0; font-size: 1.0625em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cy-row-value { flex: none; font-size: 1.0625em; color: #8e8e93; }
.cy-more::after { content: ""; flex: none; width: 0.5em; height: 0.5em; margin-right: 0.2em; border: solid #c7c7cc; border-width: 0.125em 0.125em 0 0; transform: rotate(45deg); }
.cy-footnote { max-width: 49em; margin: 0 auto; padding: 1.5em 1em 0; text-align: center; font-size: 0.8125em; color: #6d6d72; }
.cy-tabs {
  flex: none; display: flex; justify-content: center; padding-bottom: var(--mb-bottom, 8px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.3); background: rgba(248, 248, 248, 0.97); color: #929292;
}
.cy-tab { position: relative; flex: 1; max-width: 7em; display: flex; flex-direction: column; align-items: center; gap: 0.1em; padding: 0.3em 0 0.25em; }
.cy-tab.is-on { color: #007aff; }
.cy-tab-name { font-size: 0.625em; font-weight: 500; }
.cy-tab-icon { position: relative; display: block; width: 1.75em; height: 1.75em; }
.cy-tab-icon::before, .cy-tab-icon::after { content: ""; position: absolute; border: 0.125em solid; }
.cy-tab-cydia .cy-tab-icon::before { left: 18%; right: 18%; top: 38%; bottom: 10%; border-radius: 0.12em; }
.cy-tab-cydia .cy-tab-icon::after { left: 10%; right: 10%; top: 16%; height: 26%; border-radius: 0.12em; }
.cy-tab-sources .cy-tab-icon::before, .cy-tab-changes .cy-tab-icon::before { inset: 10%; border-radius: 50%; }
.cy-tab-sources .cy-tab-icon::after { left: 34%; right: 34%; top: 10%; bottom: 10%; border-radius: 50%; }
.cy-tab-changes .cy-tab-icon::after { left: 46%; top: 26%; width: 22%; height: 28%; border-width: 0 0 0.125em 0.125em; }
.cy-tab-installed .cy-tab-icon::before { left: 12%; right: 12%; top: 52%; bottom: 12%; border-top: 0; border-radius: 0 0 0.15em 0.15em; }
.cy-tab-installed .cy-tab-icon::after { left: 37%; top: 14%; width: 26%; height: 26%; border-width: 0 0.125em 0.125em 0; transform: rotate(45deg); }
.cy-tab-search .cy-tab-icon::before { left: 14%; top: 12%; width: 56%; height: 56%; border-radius: 50%; }
.cy-tab-search .cy-tab-icon::after { left: 64%; top: 60%; height: 32%; border-width: 0 0 0 0.14em; transform: rotate(-45deg); transform-origin: 0 0; }
.cy-badge {
  position: absolute; top: 0.05em; left: calc(50% + 0.3em); min-width: 1.3em; height: 1.3em; padding: 0 0.35em;
  border-radius: 0.65em; background: #ff3b30; color: #fff; font-size: 0.8125em; font-weight: 400; line-height: 1.3em; text-align: center;
}
.cy-hud {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9em;
  width: 9.5em; min-height: 8.5em; padding: 1em 0.75em; border-radius: 0.75em;
  background: rgba(0, 0, 0, 0.75); color: #fff; text-align: center; font-weight: 600;
}
.cy-hud .cy-spin, .cy-black .cy-spin { width: 2.3125em; height: 2.3125em; }

/* Alerts: iOS 7's UIAlertView, buttons stacked when there are more than two */
.cy-dim { display: grid; place-items: center; background: rgba(0, 0, 0, 0.4); animation: cy-fade 0.2s ease-out both; }
.cy-alert {
  width: 16.875em; max-width: calc(100% - 2.5em); max-height: calc(100% - 2em); overflow-y: auto;
  border-radius: 0.875em; background: rgba(248, 248, 248, 0.97); color: #000; text-align: center;
  animation: cy-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1) both;
}
.cy-alert-title { padding: 1.15em 1em 0.2em; font-size: 1.0625em; font-weight: 600; line-height: 1.3; }
.cy-alert-text { padding: 0 1.25em 1.35em; font-size: 0.8125em; line-height: 1.3; }
.cy-alert-button { display: block; width: 100%; min-height: 2.6em; padding: 0.4em 0.8em; border-top: 0.5px solid rgba(60, 60, 67, 0.29); color: #007aff; font-size: 1.0625em; }
.cy-alert-button:hover { background: rgba(0, 0, 0, 0.04); }
.cy-alert-button:active { background: rgba(0, 0, 0, 0.1); }
.cy-alert-button:focus-visible, .cy-nav-button:focus-visible, .cy-run-close:focus-visible { outline: 2px solid #007aff; outline-offset: -2px; }
@keyframes cy-fade { from { opacity: 0; } }
@keyframes cy-pop { from { opacity: 0; transform: scale(1.2); } }

/* The Confirm sheet slides up over the home page, and back down on Cancel */
.cy-sheet { box-shadow: 0 0 1em rgba(0, 0, 0, 0.25); animation: cy-up 0.38s cubic-bezier(0.2, 0.75, 0.25, 1) both; }
.cy-sheet.is-leaving { animation: cy-down 0.3s cubic-bezier(0.4, 0, 1, 1) both; }
@keyframes cy-up { from { transform: translateY(100%); } }
@keyframes cy-down { to { transform: translateY(100%); } }

/* Running: status, progress bar and dpkg's output on black */
.cy-run { background: #000; color: #fff; animation: cy-fade 0.25s ease-out both; }
.cy-run .cy-nav { border-bottom-color: rgba(255, 255, 255, 0.16); background: rgba(22, 22, 24, 0.98); }
.cy-run-status { flex: none; min-height: 2.6em; padding: 0.9em 1em 0.5em; font-size: 0.9375em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cy-run-bar { flex: none; width: calc(100% - 2.5em); max-width: 40em; height: 0.25em; margin: 0 auto; border-radius: 0.125em; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.cy-run-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; transition: transform 0.2s linear; }
.cy-run-log {
  flex: 1; min-height: 0; width: 100%; max-width: 60em; margin: 0.9em auto 0; padding: 0 1em 0.75em; overflow-y: auto;
  font: 0.6875em / 1.45 ui-monospace, Menlo, Consolas, "Courier New", monospace; color: rgba(235, 235, 245, 0.8);
  white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text;
}
.cy-run-close {
  flex: none; width: calc(100% - 2.5em); max-width: 22em; min-height: 2.75em; margin: 0.6em auto calc(var(--mb-bottom, 8px) + 0.6em);
  border-radius: 0.625em; background: #f2f2f7; color: #000; font-weight: 600;
}
.cy-run-close:active { background: #d1d1d6; }

/* Quitting, reopening and restarting SpringBoard pass through black */
.cy-black { display: grid; place-items: center; background: #000; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0s 0.25s; }
.cy-black.is-on { opacity: 1; visibility: visible; transition: opacity 0.25s; }

/* ---- Launch screens: a full-screen dialog in each layout's style that plays the system's
   animation (os-animations.js) with Start and Menu/Back. launcher-themes.js zooms it out of
   the chosen tile and back. ---- */

.oss-launch {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; overflow: hidden; color: inherit; background: transparent;
  transform-origin: 0 0;
}
.oss-launch::backdrop { background: transparent; }
.oss-launch:focus { outline: none; }
.oss-launch-anim { position: relative; overflow: hidden; background: #000; }
.oss-launch-anim canvas { position: absolute; inset: 0; }
.oss-launch button { font: inherit; cursor: pointer; }
.oss-launch-info { min-width: 0; }

/* Channels: the channel fills the screen, its banner above two big rounded buttons. */
.ch-launch {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; color: #3c4650;
  background: repeating-linear-gradient(0deg, rgba(0, 40, 80, 0.025) 0 1px, transparent 1px 4px), linear-gradient(#fdfefe, #e6ecf0);
}
.ch-launch-banner {
  position: relative; margin: clamp(14px, 3vh, 32px) clamp(14px, 4vw, 56px) 0; border-radius: 30px; overflow: hidden;
  border: 4px solid #d3dbe2; box-shadow: 0 8px 30px rgba(40, 80, 120, 0.25), inset 0 0 0 1px #fff;
}
.ch-launch-banner .oss-launch-anim { position: absolute; inset: 0; }
.ch-launch-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.16), transparent 40%);
}
.ch-launch-bar {
  display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 2fr) minmax(130px, 1fr); align-items: center; gap: 16px;
  padding: clamp(12px, 2.6vh, 26px) clamp(14px, 6vw, 90px) clamp(14px, 3vh, 30px);
}
.ch-launch-title { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.ch-launch-title strong { max-width: 100%; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 600; color: #36414b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-launch-title span { font-size: 13px; color: #6b7782; }
.ch-launch-btn {
  justify-self: center; width: min(100%, 260px); padding: clamp(12px, 2.2vh, 20px) 18px; border-radius: 22px;
  border: 3px solid #c9d6df; background: linear-gradient(#ffffff, #e8eef2 60%, #dfe7ec); color: #4a5560;
  font-size: clamp(1.05rem, 2vw, 1.35rem) !important; font-weight: 600; box-shadow: 0 3px 10px rgba(40, 80, 120, 0.15);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.ch-launch-btn:hover, .ch-launch-btn:focus-visible {
  border-color: #34beed; outline: none; transform: scale(1.04);
  box-shadow: 0 0 0 4px rgba(52, 190, 237, 0.3), 0 6px 18px rgba(40, 120, 160, 0.25);
}
.ch-launch-start { color: #136f96; }
/* The focused tile plays a small version of its animation over the icon. */
.ch-live { position: absolute; inset: 2% 3%; border-radius: 14px; overflow: hidden; opacity: 0; transition: opacity 0.35s; }
.ch-live.is-on { opacity: 1; }
.ch-tile:focus-visible { animation: ch-glow 1.6s ease-in-out infinite; }
@keyframes ch-glow {
  50% { box-shadow: 0 0 0 5px rgba(52, 190, 237, 0.45), 0 4px 18px rgba(40, 120, 160, 0.3); }
}
.oss-stage.oss-enter .ch-tile, .oss-stage.oss-enter .ch-slot { animation: ch-pop 0.5s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(var(--i, 0) * 32ms); }
@keyframes ch-pop { from { opacity: 0; transform: scale(0.7); } }
.oss-stage.oss-enter .ch-bar { animation: ch-rise 0.6s ease-out both; }
@keyframes ch-rise { from { transform: translateY(100%); } }

/* PS4-style: a game hub with the animation as hero art. */
.ps-launch {
  display: grid; grid-template-rows: minmax(0, 58fr) minmax(0, 42fr); color: #fff;
  background: radial-gradient(130% 90% at 15% 0%, #1f63c6 0%, #0d3680 38%, #071d4d 70%, #04112e 100%);
}
.ps-launch-hero { position: relative; overflow: hidden; }
.ps-launch-hero .oss-launch-anim { position: absolute; inset: 0; }
.ps-launch-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(transparent 55%, rgba(7, 29, 77, 0.75) 85%, #071d4d), linear-gradient(90deg, rgba(4, 17, 46, 0.55), transparent 35%);
}
.ps-launch-body {
  display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); column-gap: clamp(14px, 2.5vw, 28px); row-gap: 10px;
  margin-top: calc(var(--ps-hub-icon, 120px) * -0.55); padding: 0 clamp(16px, 7vw, 110px) 20px; position: relative; z-index: 1; min-height: 0;
}
.ps-launch-icon {
  grid-row: span 2; width: var(--ps-hub-icon, 120px); height: var(--ps-hub-icon, 120px); padding: 14%; object-fit: contain;
  border-radius: 6px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 3px #fff, 0 12px 30px rgba(0, 0, 0, 0.5);
}
.ps-launch-name { align-self: end; font-size: clamp(1.6rem, 3.6vw, 2.8rem); font-weight: 300; line-height: 1.1; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.ps-launch-meta { font-size: 14px; opacity: 0.8; }
.ps-launch-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; }
.ps-launch-start {
  min-width: clamp(180px, 22vw, 280px); padding: 14px 32px; border: 0; border-radius: 4px;
  background: #fff; color: #0b2c6b; font-size: 1.15rem !important; font-weight: 700; letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); transition: transform 0.15s, box-shadow 0.15s;
}
.ps-launch-back {
  padding: 13px 26px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.1); color: #fff;
  transition: background 0.15s;
}
.ps-launch-start:hover, .ps-launch-start:focus-visible { outline: none; transform: scale(1.04); box-shadow: 0 0 0 3px #4ea3ff, 0 8px 24px rgba(0, 0, 0, 0.45); }
.ps-launch-back:hover, .ps-launch-back:focus-visible { outline: none; background: rgba(255, 255, 255, 0.24); box-shadow: 0 0 0 3px #4ea3ff; }
.ps-launch-desc { grid-column: 1 / -1; max-width: 76ch; font-size: 14px; line-height: 1.5; opacity: 0.88; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ps-launch .oss-badges { margin-left: 6px; }
@property --ps-glow { syntax: "<color>"; inherits: true; initial-value: rgba(31, 99, 198, 0); }
.ps { --ps-glow: rgba(31, 99, 198, 0); transition: --ps-glow 0.6s; }
.ps::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 25% 30%, var(--ps-glow), transparent 70%);
}
.ps[data-family="windows"] { --ps-glow: rgba(70, 150, 255, 0.28); }
.ps[data-family="mac"] { --ps-glow: rgba(160, 120, 255, 0.3); }
.ps[data-family="linux"] { --ps-glow: rgba(60, 210, 150, 0.24); }
.ps[data-family="unix"] { --ps-glow: rgba(255, 110, 100, 0.24); }
.ps[data-family="other"] { --ps-glow: rgba(255, 170, 80, 0.26); }
.ps-tile.is-current::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.38) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: ps-sheen 0.9s 0.15s ease-out both;
}
@keyframes ps-sheen { to { background-position: 150% 0; } }
.ps-tile:not(.is-current):hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45); }
.ps-tile { transition: width 0.3s ease, height 0.3s ease, box-shadow 0.3s, transform 0.2s; }
.oss-stage.oss-enter .ps-tile { animation: ps-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes ps-in { from { opacity: 0; transform: translateX(80px); } }
.oss-stage.oss-enter .ps-info, .oss-stage.oss-enter .ps-top { animation: ps-fade 0.6s 0.15s ease-out both; }
@keyframes ps-fade { from { opacity: 0; transform: translateY(12px); } }

/* XMB: the animation becomes the background, with the title and a vertical Start / Back menu. */
.xmb-launch { color: #fff; background: #08183a; }
.xmb-launch .oss-launch-anim { position: absolute; inset: 0; }
.xmb-launch-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4, 10, 30, 0.86), rgba(4, 10, 30, 0.45) 45%, rgba(4, 10, 30, 0.1) 75%), linear-gradient(transparent 70%, rgba(4, 10, 30, 0.6));
}
.xmb-launch-info {
  position: absolute; left: clamp(18px, 8vw, 120px); top: 50%; transform: translateY(-50%); width: min(560px, 82vw);
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 20px; row-gap: 6px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.xmb-launch-icon { grid-row: span 2; width: clamp(72px, 9vw, 110px); height: clamp(72px, 9vw, 110px); object-fit: contain; filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.45)); animation: xmb-float 4s ease-in-out infinite; }
@keyframes xmb-float { 50% { transform: translateY(-5px); } }
.xmb-launch-name { align-self: end; font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 400; line-height: 1.15; }
.xmb-launch-meta { align-self: start; font-size: 14px; opacity: 0.85; }
.xmb-launch-desc { grid-column: 1 / -1; margin-top: 6px; font-size: 14px; line-height: 1.5; opacity: 0.9; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.xmb-launch-menu { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 16px; }
.xmb-launch-opt {
  padding: 6px 14px 6px 16px; border: 0; border-radius: 6px; background: none; color: rgba(255, 255, 255, 0.72);
  font-size: 1.15rem !important; text-shadow: inherit; transition: color 0.2s, background 0.2s, transform 0.2s; transform-origin: left center;
}
.xmb-launch-opt:hover, .xmb-launch-opt:focus-visible {
  outline: none; color: #fff; transform: scale(1.12); background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 0 18px rgba(255, 255, 255, 0.18);
}
.xmb-launch-hint { position: absolute; right: clamp(16px, 4vw, 48px); bottom: 18px; font-size: 13px; opacity: 0.72; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8); }
.xmb-item.is-current .xmb-icon { animation: xmb-breathe 2.8s ease-in-out infinite; }
@keyframes xmb-breathe { 50% { transform: scale(1.05); } }
.oss-stage.oss-enter .xmb-cat { animation: xmb-in 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes xmb-in { from { opacity: 0; transform: translateX(-40px); } }
.oss-stage.oss-enter .xmb-list { animation: ps-fade 0.6s 0.25s ease-out both; }

/* Metro: the tile grows into a splash in its own color. */
.mt-launch {
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vh, 20px); padding: clamp(16px, 3.5vh, 40px) clamp(16px, 6vw, 96px) clamp(16px, 4vh, 44px);
  background: var(--mt-color, #0063b1); color: #fff;
}
.mt-launch-head { display: flex; align-items: center; gap: 18px; min-width: 0; }
.mt-launch-back {
  flex: none; display: inline-flex; align-items: center; gap: 10px; padding: 0 14px 0 0; border: 0; background: none; color: #fff;
  font-size: 15px !important;
}
.mt-launch-back::before {
  content: "\2190"; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid #fff; border-radius: 50%;
  font-size: 20px; line-height: 1;
}
.mt-launch-back:hover::before, .mt-launch-back:focus-visible::before { background: rgba(255, 255, 255, 0.22); }
.mt-launch-back:focus-visible { outline: 2px dotted #fff; outline-offset: 4px; }
.mt-launch-title { min-width: 0; }
.mt-launch-name { font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 200; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-launch-meta { font-size: 14px; opacity: 0.85; }
.mt-launch-stage { display: grid; place-items: center; min-height: 0; }
.mt-launch-stage .oss-launch-anim { width: min(100%, calc((100vh - 260px) * 16 / 9)); aspect-ratio: 16 / 9; max-height: 100%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5), 0 16px 40px rgba(0, 0, 0, 0.35); }
.mt-launch-foot { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.mt-launch-start {
  min-width: 170px; padding: 12px 30px; border: 2px solid #fff; border-radius: 0; background: #fff; color: var(--mt-color, #0063b1);
  font-size: 1.1rem !important; font-weight: 600; transition: transform 0.12s, background 0.12s;
}
.mt-launch-start:hover, .mt-launch-start:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.5); outline-offset: 3px; }
.mt-launch-start:active { transform: scale(0.97); }
.mt-launch-desc { flex: 1; min-width: 240px; font-size: 14px; line-height: 1.5; opacity: 0.92; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mt-tile { transform: perspective(600px) rotateX(var(--mt-rx, 0deg)) rotateY(var(--mt-ry, 0deg)); transition: transform 0.12s, box-shadow 0.12s; }
.mt-tile:active { transform: perspective(600px) rotateX(var(--mt-rx, 0deg)) rotateY(var(--mt-ry, 0deg)) scale(0.97); }
.oss-stage.oss-enter .mt-tile { animation: mt-in 0.55s cubic-bezier(0.1, 0.9, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes mt-in { from { opacity: 0; transform: perspective(600px) translateX(60px) rotateY(-35deg); } }
.oss-stage.oss-enter .mt-head { animation: ps-fade 0.5s ease-out both; }
/* Live tiles: now and then a tile slides up to show its year, then back. */
.mt-live { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 8px 10px; background: var(--mt-color, #0063b1); transform: translateY(100%); pointer-events: none; }
.mt-live b { font-size: clamp(1.4rem, calc(var(--mt-unit, 110px) * 0.28), 2.6rem); font-weight: 200; line-height: 1; }
.mt-live span { font-size: 12px; opacity: 0.85; }
.mt-tile.is-live .mt-live { animation: mt-peek 8s ease-in-out infinite; animation-delay: var(--mt-delay, 0s); }
@keyframes mt-peek { 0%, 62%, 100% { transform: translateY(100%); } 70%, 92% { transform: translateY(0); } }
.mt.is-quiet .mt-tile.is-live .mt-live { animation-play-state: paused; }

/* Cover Flow: the chosen cover flips over to show the animation; the caption offers Start and Back. */
.cf-item > .cf-face:first-child, .cf-back { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.cf-face { transition: transform 0.65s cubic-bezier(0.3, 0.7, 0.2, 1), filter 0.3s, opacity 0.3s; }
.cf-back { transform: rotateY(180deg); overflow: hidden; background: #000; }
.cf-back .oss-launch-anim { position: absolute; inset: 0; border-radius: 6px; }
.cf-item.is-flipped > .cf-face:first-child { transform: rotateY(-180deg) scale(1.28); }
.cf-item.is-flipped > .cf-back { transform: rotateY(0deg) scale(1.28); }
.cf-item.is-flipped > .cf-mirror { opacity: 0; }
.cf.is-flipped .cf-item:not(.is-current) .cf-face { filter: brightness(0.35); }
.cf-item:not(.is-current):hover .cf-face:first-child { filter: brightness(1.12); }
.cf-item.is-current > .cf-face:first-child::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.55) 50%, transparent 62%) -160% 0 / 260% 100% no-repeat;
  animation: ps-sheen 1s 0.35s ease-out both;
}
.cf-actions { display: flex; justify-content: center; gap: 12px; margin-top: 4px; }
.cf-back-btn {
  margin-top: 4px; padding: 8px 22px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.cf-back-btn:hover { background: rgba(255, 255, 255, 0.2); }
.cf-back-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.oss-stage.oss-enter .cf-item > .cf-face { animation: cf-rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--d, 0) * 70ms); }
@keyframes cf-rise { from { opacity: 0; translate: 0 40px; } }
.oss-stage.oss-enter .cf-caption, .oss-stage.oss-enter .cf-slider { animation: ps-fade 0.6s 0.3s ease-out both; }

/* ---- Less motion when the system asks for it ---- */

@media (prefers-reduced-motion: reduce) {
  .oss-stage *, .oss-stage *::before, .oss-stage *::after, .theme-option {
    transition: none !important; animation: none !important; scroll-behavior: auto !important;
  }
}
