:root {
  color-scheme: dark;
  --bg: #070b16; --panel: #0c1323; --panel2: #111c30; --line: #263550;
  --text: #edf4ff; --muted: #91a1bd; --cyan: #8ce6ff; --violet: #a69cff;
  --green: #8cf0c2; --danger: #ff9eae; --rail: 188px;
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: "Space Grotesk", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
body { overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 2px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* BACKGROUND: both canvases sit behind the UI and never take pointer input */
#horizon-bh, #horizon-cosmos { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%;
  pointer-events: none; background: #050812; }
#horizon-cosmos { display: none; }
#singularity-background {
  position: fixed;
  z-index: 0;
  top: -34px;
  left: 0;
  display: none;
  width: 100%;
  height: calc(100% + 68px);
  border: 0;
  background: #02030a;
  opacity: 0;
  pointer-events: none;
  transform: rotate(45deg);
  transform-origin: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%, 10% 84%, 0 84%);
}
.space-shade { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 40%, rgba(2,4,10,.55)); }

/* AUTHENTICATION */

#authScreen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 460px);
  background: rgba(5,8,18,.93);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 35px;
  padding: clamp(28px, 6vw, 85px);
  overflow: hidden;
  border-right: 1px solid #94b8ff20;
  background:
    radial-gradient(ellipse at 22% 28%, #183d6177, transparent 45%),
    linear-gradient(145deg, #0b1425dd, #060a16cc);
}

.auth-story:before,
.auth-story:after {
  content: "";
  position: absolute;
  right: -8%;
  top: 12%;
  width: min(54vw, 650px);
  aspect-ratio: 1;
  border: 1px solid #8ce6ff24;
  border-radius: 50%;
  box-shadow: 0 0 0 42px #8ce6ff07, 0 0 0 90px #8ce6ff04;
  pointer-events: none;
}

.auth-story:after {
  width: min(38vw, 450px);
  right: 2%;
  top: 27%;
  border-color: #a69cff35;
}

.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .2em;
}

.brand-symbol {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #8ce6ff5e;
  border-radius: 12px;
  color: var(--cyan);
  background: #10233a;
  font-size: 20px;
  box-shadow: 0 0 28px #5bcaff19;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #8294b2;
  font-size: 9px;
  letter-spacing: .18em;
}

.story-copy {
  position: relative;
  z-index: 1;
  max-width: 650px;
}

.eyebrow {
  color: var(--cyan);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.story-copy h1 {
  margin: 20px 0;
  font-size: clamp(44px, 6vw, 86px);
  line-height: .96;
  letter-spacing: -.075em;
}

.story-copy h1 span {
  color: var(--cyan);
  text-shadow: 0 0 40px #8ce6ff28;
}

.story-copy p {
  max-width: 420px;
  color: #a8b8d1;
  font-size: 14px;
  line-height: 1.85;
}

.story-foot {
  position: relative;
  z-index: 1;
  color: #7185a6;
  font-size: 9px;
  letter-spacing: .18em;
}

.auth-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(25px, 4vw, 54px);
  background: rgba(7,12,24,.9);
}

.auth-box { width: 100%; max-width: 350px; }

.auth-box h2 {
  margin: 14px 0 8px;
  font-size: 29px;
  letter-spacing: -.05em;
}

.auth-sub {
  margin: 0 0 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.auth-card { display: grid; gap: 9px; }

.auth-card label {
  margin-top: 7px;
  color: #b8c6db;
  font-size: 11px;
}

.auth-card input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  color: #f0f6ff;
  border: 1px solid #2d3d59;
  border-radius: 10px;
  background: #090f1e;
  outline: none;
}

.auth-card input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px #8ce6ff12;
}

.primary {
  min-height: 45px;
  margin-top: 9px;
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: #08111e;
  background: linear-gradient(110deg, #9cecff, #b5b2ff);
  font-weight: 850;
}

.primary:disabled { opacity: .6; cursor: wait; }

.auth-message {
  min-height: 20px;
  color: var(--danger);
  font-size: 11px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.auth-message.good { color: var(--green); }

.auth-switch {
  margin-top: 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-switch button {
  padding: 0;
  border: 0;
  color: var(--cyan);
  background: none;
  font-weight: 800;
}

.auth-note {
  margin-top: 21px;
  color: #7184a1;
  font-size: 10px;
  line-height: 1.7;
}

.auth-status {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 15px 0;
  padding: 12px;
  border: 1px solid #344765;
  border-radius: 10px;
  color: #aabbd5;
  background: #0d1728;
  font-size: 11px;
  line-height: 1.6;
}

.auth-status .pulse {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px #8ce6ff77;
}

.auth-status.pending .pulse {
  background: #ffcc83;
  box-shadow: 0 0 12px #ffcc8355;
}
.top-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .17em;
}

.top-brand .brand-symbol {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
}

.top-brand small {
  display: block;
  margin-top: 4px;
  color: #8294b2;
  font-size: 8px;
  letter-spacing: .17em;
}

.topbar-spacer { flex: 1; }
.subtle-button {
  padding: 9px 11px;
  border: 1px solid #2d3c57;
  border-radius: 9px;
  color: #c6d5eb;
  background: #101a2c;
  font-size: 11px;
}

.subtle-button:hover { border-color: #60789f; }
.nav-button {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8fa2c0;
  background: transparent;
  text-align: left;
  font-size: 12px;
}

.nav-button:hover { background: #111d31; color: #e5f1ff; }

.nav-button.active {
  border-color: #345574;
  color: #dff7ff;
  background: linear-gradient(100deg,#18334a,#111c30);
  box-shadow: inset 2px 0 var(--cyan);
}

.nav-icon {
  width: 19px;
  color: #9acbe7;
  text-align: center;
  font-size: 15px;
}
.primary-small, .secondary-small {
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 11px;
}

.primary-small {
  border: 0;
  color: #07111c;
  background: linear-gradient(110deg,#9cecff,#b5b2ff);
  font-weight: 850;
}

.secondary-small {
  border: 1px solid #3a4d6c;
  color: #cbd9ee;
  background: #111d31;
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
}

.scene-card {
  position: relative;
  min-width: 0;
  min-height: 125px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #293955;
  border-radius: 13px;
  color: var(--text);
  background: #0b1221;
  text-align: left;
  transition: border-color .2s, transform .2s;
}

.scene-card:hover { transform: translateY(-2px); border-color: #647da6; }
.scene-card.active { border-color: var(--cyan); box-shadow: 0 0 0 1px #8ce6ff30; }

.scene-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 84px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%,#203e66,#090e1c 72%);
}

.scene-art:before {
  content: "";
  position: absolute;
  width: 65px;
  height: 65px;
  border: 1px solid #a6dfff55;
  border-radius: 50%;
  box-shadow: 0 0 24px #5baaff25;
}

.scene-art.blackhole:before {
  content: "";
  width: 43px;
  height: 43px;
  border: 1px solid #294caa;
  border-radius: 50%;
  background: radial-gradient(circle, #02030a 0 42%, transparent 45%);
  box-shadow: 0 0 18px #204fe877;
}

.scene-art.blackhole:after {
  content: "";
  width: 94px;
  height: 14px;
  border: 3px solid #ffd58f;
  border-left-color: #fff1ca;
  border-right-color: #dc7642;
  border-radius: 50%;
  transform: rotate(45deg);
  box-shadow: 0 0 15px #ffb46599;
}

.scene-art.planet:before {
  background: radial-gradient(circle at 30% 30%,#f5dfb8,#b1838b 50%,#263755);
  box-shadow: 0 0 0 9px #a8d4ff15,0 0 30px #758fff42;
}

.scene-art.planet:after {
  content: "";
  position: absolute;
  width: 95px;
  height: 24px;
  border: 2px solid #c4b6ff99;
  border-radius: 50%;
  transform: rotate(-20deg);
}

.scene-art.solar:before {
  width: 25px;
  height: 25px;
  background: #ffcb75;
  box-shadow: 0 0 22px #ff9c42;
}

.scene-art.solar:after {
  content: "";
  position: absolute;
  width: 72px;
  height: 50px;
  border: 1px solid #82cfff77;
  border-radius: 50%;
}

.scene-art.nebula {
  background: radial-gradient(ellipse at 30% 40%,#733d9b,#1b3d70 40%,#070d1b 75%);
}

.scene-art.orbit {
  background: radial-gradient(ellipse at 50% 50%,#174b6b,#070d1b 75%);
}

.scene-art.orbit:after {
  content: "✧  ·  ✦  ·  ✧";
  color: #9fe8ff;
  letter-spacing: 8px;
}

.scene-art.stars {
  background: radial-gradient(ellipse at 50% 50%,#15284c,#070d1b 75%);
}

.scene-art.stars:after {
  content: "✦  ·  ·  ✧  ·  ✦";
  color: #c4d8ff;
}

.scene-art.aurora {
  background: radial-gradient(ellipse at 50% 100%,#145b69,#081426 68%);
}

.scene-art.aurora:before {
  width: 110px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(0deg,#49ffb444,#4fdfff08 78%,transparent);
  filter: blur(7px);
  transform: rotate(-12deg);
}

.scene-art.aurora:after {
  content: "";
  position: absolute;
  width: 100px;
  height: 36px;
  border-top: 2px solid #85ffc9cc;
  border-radius: 50%;
  box-shadow: 0 -7px 12px -7px #65f8ff;
  transform: rotate(-12deg);
}

.scene-art.wormhole {
  background: radial-gradient(ellipse at 50% 50%,#201343,#080d1b 72%);
}

.scene-art.wormhole:before {
  width: 38px;
  height: 38px;
  border: 5px solid #8e6dff;
  background: #02030a;
  box-shadow: 0 0 18px #9b64ff, 0 0 34px #2bdaff77;
  transform: perspective(70px) rotateX(58deg);
}

.scene-art.wormhole:after {
  content: "";
  position: absolute;
  width: 76px;
  height: 32px;
  border: 2px solid #78eaff99;
  border-radius: 50%;
  box-shadow: 0 0 15px #8e6dff99;
  transform: perspective(70px) rotateX(58deg) rotate(-12deg);
  letter-spacing: 5px;
}

.scene-label { display: block; padding: 10px 11px; font-size: 11px; font-weight: 750; }
.scene-description { display: block; padding: 0 11px 10px; color: #8095b5; font-size: 9px; }
/* GAMES */

.game-add { display: flex; gap: 10px; margin: 20px 0; }
.game-add input {
  flex: 1;
  min-width: 0;
  height: 43px;
  padding: 0 13px;
  border: 1px solid #2d3d59;
  border-radius: 10px;
  color: var(--text);
  background: #090f1e;
}
.game-add button {
  padding: 0 15px;
  border: 0;
  border-radius: 10px;
  color: #08111e;
  background: linear-gradient(110deg,#9cecff,#b5b2ff);
  font-size: 11px;
  font-weight: 850;
}

.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(190px,1fr));
  gap: 12px;
}

.game-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 150px;
  padding: 16px;
  border: 1px solid #293955;
  border-radius: 13px;
  background: linear-gradient(145deg,#111d31,#080e1b);
}

.game-icon {
  color: var(--cyan);
  font-size: 22px;
}

.game-card h3 { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.game-card p { margin: 0; color: #8498b7; font-size: 10px; overflow-wrap: anywhere; }

.game-actions { display: flex; gap: 7px; margin-top: auto; padding-top: 8px; }

.game-actions button {
  padding: 8px 10px;
  border: 1px solid #3b5272;
  border-radius: 8px;
  color: #e1f4ff;
  background: #13243a;
  font-size: 10px;
}

.game-actions button:first-child {
  border-color: transparent;
  color: #07111d;
  background: var(--cyan);
  font-weight: 800;
}

.empty-card {
  grid-column: 1/-1;
  padding: 26px;
  border: 1px dashed #3a4b66;
  border-radius: 12px;
  color: #93a7c5;
  font-size: 12px;
  line-height: 1.7;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid #22324a;
}

.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 11px; }
.setting-row small { display: block; margin-top: 5px; color: #8296b4; font-size: 10px; line-height: 1.6; }

/* Your own domain (Settings -> Account) */
.byod-steps { margin: 10px 0 4px; padding-left: 18px; color: #8296b4; font-size: 10px; line-height: 1.7; }
.byod-steps code, #byodCard p code { color: inherit; background: #1a2638; padding: 1px 5px; border-radius: 4px; }
.byod-form input { flex: 1; min-width: 0; background: #0f1826; border: 1px solid #22324a; border-radius: 8px; color: inherit; padding: 8px 10px; font: inherit; font-size: 11px; }
.byod-message { min-height: 14px; font-size: 10px; color: #8296b4; }
#byodList .setting-row small { word-break: break-all; }

.setting-row select {
  max-width: 145px;
  padding: 8px;
  border: 1px solid #344765;
  border-radius: 8px;
  color: #eaf4ff;
  background: #101a2b;
  font-size: 10px;
}

.setting-row input[type="range"] { max-width: 130px; accent-color: var(--cyan); }
.setting-row input[type="color"] { width: 42px; height: 32px; padding: 2px; border: 1px solid #344765; border-radius: 8px; background: #101a2b; }
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  max-width: min(360px,calc(100vw - 40px));
  padding: 13px 16px;
  border: 1px solid #385472;
  border-radius: 11px;
  color: #e9f5ff;
  background: #101b2d;
  box-shadow: 0 14px 50px #0008;
  font-size: 11px;
}
/* APPLICATION SHELL (no backdrop-filter anywhere: it re-blurs the animated canvas every frame) */
#horizonApp { display: none; position: relative; z-index: 2; }
.app-frame { position: relative; display: grid; grid-template-columns: var(--rail) minmax(0,1fr);
  grid-template-rows: 56px minmax(0,1fr); height: 100vh; height: 100dvh; }
.app-frame.sidebar-right { grid-template-columns: minmax(0,1fr) var(--rail); }
.app-frame.sidebar-right .sidebar { grid-column: 2; border-right: 0; border-left: 1px solid #26344e; }
.app-frame.sidebar-right .main { grid-column: 1; }
.app-frame.sidebar-collapsed { --rail: 64px; }
.app-frame.sidebar-collapsed .nav-text { display: none; }
.app-frame.sidebar-collapsed .nav-button { justify-content: center; padding-inline: 5px; }
.app-frame.sidebar-collapsed .nav-icon { width: auto; font-size: 18px; }
.topbar { grid-column: 1/-1; display: flex; align-items: center; gap: 14px; padding: 0 20px;
  border-bottom: 1px solid #26344e; background: rgba(6,10,21,.7); }
.sidebar { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; gap: 4px; min-height: 0;
  padding: 16px 12px; border-right: 1px solid #26344e; background: rgba(6,10,21,.7); }
.main { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow: auto;
  padding: 26px clamp(16px,3vw,40px) 38px; background: rgba(5,9,19,.82); }
body[data-page="homePage"] .main { background: transparent; }

.page { min-height: 100%; }
.page-head h1 { margin: 0 0 6px; font-size: clamp(26px,3vw,36px); letter-spacing: -.03em; }
.page-head p { margin: 0 0 22px; color: #91a3bf; font-size: 13px; line-height: 1.6; }

/* HOME */
.home { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center;
  padding-bottom: clamp(24px,9vh,96px); }
.home-title { margin: 0 0 22px; font-size: clamp(34px,5.4vw,64px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05;
  text-shadow: 0 2px 30px #000c; }
.home-search { display: flex; gap: 8px; width: min(580px,100%); padding: 6px; border: 1px solid #38557a; border-radius: 999px;
  background: rgba(7,12,25,.78); }
.home-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px #8ce6ff1c; }
.home-search input { flex: 1; min-width: 0; padding: 0 16px; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 15px; }
.home-search .primary-small { padding: 0 22px; border-radius: 999px; font-size: 13px; }
.home-links { display: flex; gap: 6px; margin-top: 16px; }
.link-button { padding: 8px 14px; border: 1px solid transparent; border-radius: 999px; color: #b9c9e0; background: rgba(7,12,25,.55); font-size: 13px; }
.link-button:hover { color: #fff; border-color: #38557a; }

/* BROWSER: a real fullscreen layer that is a direct child of #horizonApp */
#browserPage { position: fixed; inset: 0; z-index: 1500; height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: #050812; }
.browser-shell { display: grid; grid-template-rows: 40px 44px minmax(0,1fr); width: 100%; height: 100%; min-height: 0; }
.browser-tabs { display: flex; align-items: flex-end; gap: 5px; min-width: 0; padding: 6px 52px 0 8px; border-bottom: 1px solid #283650; background: #080d19; }
#browserTabs { display: flex; align-items: flex-end; gap: 4px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.browser-tab { display: flex; align-items: center; flex: 0 1 200px; min-width: 84px; height: 33px; border: 1px solid #293953; border-bottom: 0;
  border-radius: 8px 8px 0 0; color: #93a7c4; background: #111a2b; font-size: 12px; }
.browser-tab.active { color: #eaf7ff; background: #17243a; border-color: #436184; }
.browser-tab button { border: 0; color: inherit; background: none; }
.tab-select { flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 10px; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.tab-close { width: 22px; height: 22px; margin-right: 5px; border-radius: 5px; font-size: 15px; line-height: 1; }
.tab-close:hover { background: #ffffff1c; }
.browser-newtab { flex: 0 0 28px; height: 28px; margin-bottom: 3px; border: 1px solid #2a3b57; border-radius: 7px; color: #bcecff; background: #111a2b; font-size: 16px; }
.browser-toolbar { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-bottom: 1px solid #263650; background: #0c1321; }
.browser-toolbar > button { flex: 0 0 32px; height: 32px; border: 1px solid #2a3b56; border-radius: 8px; color: #c7d9f0; background: #141f32; }
.browser-toolbar > button:hover, .browser-newtab:hover { border-color: #60789f; }
.address-form { display: flex; align-items: center; flex: 1; gap: 8px; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid #30415d; border-radius: 9px; background: #050a14; }
.address-form:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 2px #8ce6ff18; }
.address-form > span { color: #7f9cbb; font-size: 12px; }
.address-form button { border: 0; padding: 0 2px; color: #9fb4d2; background: none; }
#urlInput { width: 100%; min-width: 0; border: 0; outline: 0; color: #f0f7ff; background: transparent; font-size: 13px; }
#browserViewport { position: relative; min-height: 0; overflow: hidden; background: #050812; }
#frames { position: absolute; inset: 0; overflow: hidden; }
#frames > iframe { position: absolute !important; inset: 0 !important; display: none; width: 100% !important; height: 100% !important; border: 0 !important; background: #fff; }
#frames > iframe.active { display: block; }
#browserEmpty { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 24px; overflow: auto;
  background: radial-gradient(ellipse at 50% 35%,#13233c,#050812 65%); text-align: center; color: #91a6c4; font-size: 13px; line-height: 1.7; }
#browserEmpty > div { max-width: 460px; }
#browserEmpty strong { display: block; margin-bottom: 8px; color: #e5f4ff; font-size: 22px; letter-spacing: -.02em; }
#browserEmpty.error strong { color: var(--danger); }
#browserEmpty .secondary-small { margin-top: 14px; }
/* the required close button: small, top-right, always above the tab strip */
.browser-x { position: fixed; z-index: 1510; top: 7px; right: 8px; width: 30px; height: 30px; padding: 0; border: 1px solid #694354; border-radius: 8px;
  color: #ffd6df; background: #25131f; font-size: 20px; line-height: 1; }
.browser-x:hover { background: #542334; border-color: #ff9eae; }

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.panel-card { padding: 20px; border: 1px solid #293955; border-radius: 16px; background: linear-gradient(145deg,rgba(17,29,49,.95),rgba(8,14,27,.97)); }
.panel-card.wide { grid-column: 1/-1; }
.panel-card h2 { margin: 0 0 14px; font-size: 15px; }
.panel-card .scene-grid { margin-bottom: 8px; }
.note { margin: 10px 0 0; color: #ffcf9a; font-size: 12px; line-height: 1.6; }
#status { color: #7d92b0; font-size: 12px; overflow-wrap: anywhere; }
#proxyHelp { margin: 10px 0 0; color: #ffb4c1; font-size: 12px; line-height: 1.6; }
.setting-row input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--cyan); }
.setting-row select { font-size: 12px; }
.setting-row strong { font-size: 13px; }

@media (max-width: 850px) {
  :root { --rail: 64px; }
  .app-frame { --rail: 64px !important; }
  .nav-text { display: none; }
  .nav-button { justify-content: center; padding: 13px 5px; }
  .nav-icon { width: auto; font-size: 18px; }
  .settings-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  #authScreen { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-side { padding: 24px; }
  .topbar { padding: 0 12px; }
  .main { padding: 20px 12px 28px; }
  .game-add { flex-direction: column; }
  .game-add button { min-height: 42px; }
  .home-links { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* ===================== HORIZON DESIGN LAYER ===================== */
:root { --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; --ease: cubic-bezier(.2,.8,.2,1); }
::selection { background: color-mix(in srgb, var(--cyan) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: #2c4160 transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: #2c4160; border-radius: 9px; }
button { transition: transform .15s var(--ease), border-color .2s, background .2s, box-shadow .2s, filter .2s; }
button:active:not(:disabled) { transform: scale(.96); }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes tileIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
@keyframes buttonSheen { to { transform: translateX(260%) skewX(-20deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes shimmer { to { background-position: 100% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
.page:not(.hidden):not(#browserPage) { animation: pageIn .45s var(--ease); }

/* shared accent buttons */
.primary, .primary-small, .game-add button { background: linear-gradient(110deg, var(--cyan), var(--violet)); box-shadow: 0 8px 26px -10px var(--cyan); }
.primary, .primary-small, .game-add button { position: relative; overflow: hidden; isolation: isolate; }
.primary::after, .primary-small::after, .game-add button::after {
  content: ""; position: absolute; z-index: -1; top: -40%; bottom: -40%; left: -35%; width: 28%;
  background: linear-gradient(90deg, transparent, #ffffff70, transparent); transform: translateX(-160%) skewX(-20deg);
  transition: transform .65s var(--ease); pointer-events: none;
}
.primary:hover, .primary-small:hover, .game-add button:hover { filter: brightness(1.12); transform: translateY(-2px) scale(1.02); box-shadow: 0 12px 32px -10px var(--cyan); }
.primary:hover::after, .primary-small:hover::after, .game-add button:hover::after { transform: translateX(460%) skewX(-20deg); }
.primary:active:not(:disabled), .primary-small:active:not(:disabled), .game-add button:active:not(:disabled) { transform: translateY(0) scale(.97); }
.secondary-small, .subtle-button { border-radius: 10px; }
.secondary-small:hover, .subtle-button:hover { border-color: var(--cyan); color: #fff; box-shadow: 0 0 18px -8px var(--cyan); }

/* brand + topbar */
.brand-symbol { color: var(--cyan); background: radial-gradient(circle, #14304a, #0a1424); }
.brand-symbol svg { width: 76%; height: 76%; } .brand-symbol .orb { transform-origin: 16px 16px; animation: spin 16s linear infinite; }
.topbar { border-bottom: 1px solid #ffffff12; background: linear-gradient(180deg, rgba(7,11,22,.9), rgba(7,11,22,.55)); }
.chip { padding: 6px 11px; border: 1px solid #2b3d5a; border-radius: 99px; color: #b7c9e4; background: #0b1424; font: 600 11px var(--mono); }
.chip.live { color: var(--green); } .chip.live::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2s infinite; }

/* sidebar */
.sidebar { background: linear-gradient(180deg, rgba(8,14,28,.82), rgba(5,8,18,.7)); border-right-color: #ffffff12; }
.nav-button { border-radius: 12px; padding: 13px 12px; }
.nav-button:hover { transform: translateX(3px); }
.nav-button.active { background: linear-gradient(100deg, color-mix(in srgb, var(--cyan) 22%, #0c1426), transparent); border-color: transparent; box-shadow: inset 3px 0 var(--cyan), 0 0 26px -12px var(--cyan); }
.nav-button.active .nav-icon { color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }

/* home */
.home-kicker { margin: 0 0 14px; color: var(--cyan); font: 500 12px var(--mono); letter-spacing: .3em; text-transform: uppercase; opacity: .9; }
.home-title { background: linear-gradient(100deg, #fff 15%, var(--cyan) 55%, var(--violet) 85%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 6px 34px #000c); animation: shimmer 9s ease-in-out infinite alternate; }
.home-search { height: 60px; border-color: #ffffff24; background: rgba(6,10,22,.74); box-shadow: 0 24px 70px -24px #000, inset 0 0 0 1px #ffffff08; transition: border-color .2s, box-shadow .3s, transform .3s var(--ease); }
.home-search:focus-within { transform: scale(1.02); border-color: var(--cyan); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 14%, transparent), 0 24px 80px -20px var(--cyan); }
.home-search input { font-size: 16px; }
.home-links { gap: 12px; margin-top: 24px; }
.link-button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; width: 96px; padding: 15px 8px; overflow: hidden; border: 1px solid #ffffff16; border-radius: 18px; background: rgba(8,13,26,.64); font-size: 12px; font-weight: 600; animation: tileIn .48s var(--ease) both; }
.link-button:nth-child(2) { animation-delay: .08s; } .link-button:nth-child(3) { animation-delay: .16s; }
.link-button:hover, .link-button:focus-visible { transform: translateY(-5px) scale(1.04); border-color: var(--cyan); box-shadow: 0 16px 34px -18px var(--cyan), inset 0 0 24px -16px var(--cyan); }
.link-button:active:not(:disabled) { transform: translateY(-1px) scale(.97); }
.tile-ic { display: inline-block; font-size: 22px; color: var(--cyan); transition: transform .3s var(--ease), filter .3s; }
.link-button:hover .tile-ic, .link-button:focus-visible .tile-ic { transform: scale(1.22) rotate(-8deg); filter: drop-shadow(0 0 9px var(--cyan)); }
.home-hint { margin: 18px 0 0; color: #7f93b3; font: 11px var(--mono); }
kbd { padding: 2px 7px; border: 1px solid #3a4f72; border-bottom-width: 2px; border-radius: 6px; background: #0d1830; color: #cfe3ff; font: 11px var(--mono); }

/* panels + settings */
.panel-card { border: 1px solid #ffffff14; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--panel2) 85%, white 15%), color-mix(in srgb, var(--panel2) 45%, #070c18)); box-shadow: 0 26px 60px -34px #000; }
.panel-card h2 { color: var(--cyan); font: 700 12px var(--mono); letter-spacing: .18em; text-transform: uppercase; }
.page-head h1 { background: linear-gradient(100deg, #fff, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.scene-card { border-radius: 14px; } .scene-card:hover, .scene-card:focus-visible { box-shadow: 0 16px 36px -18px var(--cyan); }
.scene-card.active { box-shadow: 0 0 0 1px var(--cyan), 0 0 30px -10px var(--cyan); }
.scene-card .scene-art { transition: filter .3s, transform .35s var(--ease); }
.scene-card:hover .scene-art, .scene-card:focus-visible .scene-art { filter: brightness(1.2); transform: scale(1.04); }
.scene-art.orbit:before { width: 6px; height: 62px; border: 0; border-radius: 3px; background: linear-gradient(#d3e8f5, #5d7a92); box-shadow: 0 0 14px #8ce6ff55; }
.scene-art.orbit:after { content: ""; width: 78px; height: 26px; border: 3px solid #b9d4e6; border-radius: 50%; transform: rotate(-16deg); box-shadow: 0 0 14px #8ce6ff66; letter-spacing: 0; }
.setting-row input[type=checkbox] { appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 25px; border: 1px solid #31456a; border-radius: 99px; background: #18253d; cursor: pointer; transition: .25s; }
.setting-row input[type=checkbox]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #8da3c4; transition: transform .25s var(--ease), background .25s; }
.setting-row input[type=checkbox]:checked { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 30%, #0b1424); }
.setting-row input[type=checkbox]:checked::after { transform: translateX(19px); background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.setting-row input[type=range] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 9px; background: #1b2b47; }
.setting-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.setting-row input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--cyan); }
.setting-row select { border-radius: 10px; }
.toast { animation: toastIn .35s var(--ease); border-color: var(--cyan); border-radius: 14px; }

/* games */
.game-filter { width: min(340px, 100%); height: 40px; padding: 0 14px; border: 1px solid #2d3d59; border-radius: 99px; color: var(--text); background: #090f1e; outline: 0; }
.game-filter:focus { border-color: var(--cyan); }
.count-pill { margin-left: 8px; padding: 2px 9px; border: 1px solid #2b3d5a; border-radius: 99px; color: var(--cyan); font: 11px var(--mono); }
.game-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.game-card { position: relative; min-height: 0; padding: 0; overflow: hidden; border-radius: 18px; cursor: pointer; transition: transform .3s var(--ease), box-shadow .3s, border-color .2s; content-visibility: auto; contain-intrinsic-size: auto 190px; }
.game-sentinel { grid-column: 1 / -1; height: 1px; }

/* INTERFACES: body[data-iface] swaps the home screen. "default" is the dashboard; "switch" and "ps3" show
   #consoleHome over it (home page only, so the other pages keep the normal sidebar to get back). */
.console-home { display: none; position: fixed; inset: 0; z-index: 5; flex-direction: column; color: #fff; user-select: none; }
body[data-page="homePage"][data-iface]:not([data-iface="default"]) .console-home { display: flex; }
body[data-page="homePage"][data-iface]:not([data-iface="default"]) .app-frame { visibility: hidden; }
/* Switch: the console's dark grey, cyan cursor, grey dock circles with coloured icons */
body[data-iface="switch"] .console-home { --cyan: #00c3e3; background: #2d2d2d; }
body[data-iface="switch"] .ch-avatar { background: #e60012; color: #fff; box-shadow: 0 0 0 3px #2d2d2d, 0 0 0 5px #fff; }
body[data-iface="switch"] .ch-tile { border-radius: 0; outline: 0; }
body[data-iface="switch"] .ch-tile.on { box-shadow: 0 0 0 4px #2d2d2d, 0 0 0 8px #00c3e3, 0 0 24px 6px #00c3e388; animation: swPulse2 1.1s ease-in-out infinite alternate; }
@keyframes swPulse2 { to { box-shadow: 0 0 0 4px #2d2d2d, 0 0 0 8px #5ff2e3, 0 0 28px 8px #5ff2e388; } }
body[data-iface="switch"] .ch-dock { gap: 18px; } body[data-iface="switch"] .ch-dock button { width: 60px; height: 60px; background: #4b4b4b; font-size: 22px; box-shadow: 0 2px 4px #0006; }
body[data-iface="switch"] .ch-dock button:nth-child(1) { color: #ff4554; } body[data-iface="switch"] .ch-dock button:nth-child(2) { color: #ff9f1a; } body[data-iface="switch"] .ch-dock button:nth-child(3) { color: #3d9bff; }
body[data-iface="switch"] .ch-dock button:nth-child(4) { color: #d9d9d9; } body[data-iface="switch"] .ch-dock button:nth-child(5) { color: #5ff2e3; } body[data-iface="switch"] .ch-dock button:nth-child(6) { color: #d9d9d9; }
body[data-iface="switch"] .ch-dock button:hover, body[data-iface="switch"] .ch-dock button:focus-visible { background: #4b4b4b; color: #fff; box-shadow: 0 0 0 3px #2d2d2d, 0 0 0 6px #00c3e3; transform: none; }
body[data-iface="switch"] .ch-dock button::after { top: 72px; color: #00c3e3; font-size: 13px; }
body[data-iface="switch"] .ch-foot { border-top-color: #fff; }
/* PS3: the blue cross-menu backdrop with its ribbon, clock tucked top-right */
body:is([data-iface="ps3"], [data-iface="psp"]) .console-home { background: var(--t-bg); }
body:is([data-iface="ps3"], [data-iface="psp"]) .ch-avatar, body:is([data-iface="ps3"], [data-iface="psp"]) .ch-net { visibility: hidden; }
body:is([data-iface="ps3"], [data-iface="psp"]) .ch-clock { padding: 4px 18px 6px 40px; border-bottom: 1px solid #ffffff80; background: linear-gradient(90deg, transparent, #ffffff1f); font-size: 15px; font-weight: 400; }
body:is([data-iface="ps3"], [data-iface="psp"]) .xmb-wave { opacity: .9; }
/* Wii: no top bar at all; the clock lives in the curved bar */
body[data-iface="wii"] .ch-top { display: none; } body[data-iface="wii"] #wiiGrid { padding-top: 26px; }
.ch-view { display: none !important; }
body[data-iface="switch"] .v-switch, body[data-iface="wii"] .v-wii, body[data-iface="steam"] .v-steam, body:is([data-iface="xbox"], [data-iface="x360"]) .v-xbox, body[data-iface="ds"] .v-ds, body[data-iface="ps5"] .v-ps5, body[data-iface="gb"] .v-gb { display: flex !important; }
body:is([data-iface="ps3"], [data-iface="psp"]) .v-ps3 { display: block !important; }
/* Wii, Steam, Xbox and DS homes share .g-tile buttons inside a .g-grid */
body[data-iface="wii"] .console-home { background: repeating-linear-gradient(#f5f7f9 0 3px, #eceff2 3px 6px); color: #4a4f57; }
body[data-iface="steam"] .console-home { background: #171d25; color: #c7d5e0; }
body[data-iface="x360"] .console-home { background: radial-gradient(circle at 50% 30%, #fbfbfb, #cdd2d5); color: #222; }
body[data-iface="xbox"] .console-home { background: #0e0e0e; color: #fff; overflow: hidden; }
body[data-iface="ds"] .console-home { background: radial-gradient(circle at 50% 40%, #3a4250, #14171c); }
body[data-iface="ps5"] .console-home { background: #05070d; color: #fff; overflow: hidden; }
body[data-iface="gb"] .console-home { background: #2b2d33; }
body[data-iface="psp"] .xmb-cat .ic { font-size: 36px; } body[data-iface="psp"] .xmb-item .th { width: 64px; height: 44px; border-radius: 4px; } body[data-iface="psp"] .xmb-wave { opacity: 1; }
/* These draw their own status bar and hints */
body:is([data-iface="steam"], [data-iface="ds"], [data-iface="ps5"], [data-iface="gb"]) .ch-top, body:is([data-iface="steam"], [data-iface="ds"], [data-iface="ps5"], [data-iface="gb"], [data-iface="xbox"]) .ch-foot { display: none; }
body[data-iface="xbox"] .ch-avatar { background: #107c10; color: #fff; } body[data-iface="xbox"] .ch-net { display: none; }
body:is([data-iface="wii"], [data-iface="x360"]) .ch-net { color: #6b7480; }
body:is([data-iface="wii"], [data-iface="x360"]) .ch-foot { border-top-color: #0003; color: #3a424d; }
body:is([data-iface="wii"], [data-iface="x360"]) .ch-foot kbd { background: #3a424d; color: #fff; }
body[data-iface="wii"] .ch-foot { display: none; }
.v-wii, .v-steam, .v-xbox, .v-ds, .v-ps5, .v-gb { flex: 1; flex-direction: column; min-height: 0; }
.g-tile { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; min-width: 0; min-height: 0; padding: 6px; overflow: hidden; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: transform .15s, box-shadow .15s, outline-color .15s; }
.g-tile .g-ic { font-size: 30px; line-height: 1; } .g-tile .g-lb { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.g-tile.has-img .g-ic, .g-tile.has-img .g-lb { display: none; }
#wiiGrid { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 14px; min-height: 0; padding: 6px max(30px, 7vw) 18px; }
.v-wii .g-tile { border: 3px solid #fff; border-radius: 18px; background: #dfe3e8 center / cover no-repeat; color: #5a626d; box-shadow: 0 2px 8px #0003, inset 0 0 0 1px #c9ced4; }
.v-wii .g-tile.on { box-shadow: 0 0 0 4px #35b5e9, 0 0 20px #35b5e9aa; transform: scale(1.03); }
.wii-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px max(30px, 7vw) 16px; border-top: 3px solid #35b5e9; border-radius: 50% 50% 0 0 / 22px 22px 0 0; background: linear-gradient(#e4e8ec, #c6ccd3); }
.wii-bar button { width: 58px; height: 58px; border: 3px solid #35b5e9; border-radius: 50%; background: #fff; color: #5a626d; font-size: 22px; cursor: pointer; box-shadow: 0 2px 6px #0003; transition: transform .15s; }
.wii-bar button:hover, .wii-bar button:focus-visible { transform: scale(1.1); outline: 0; }
.wii-bar span { display: grid; justify-items: center; color: #7b8490; line-height: 1.1; }
.wii-bar span b { font-size: 34px; font-weight: 500; letter-spacing: .04em; } .wii-bar span small { font-size: 15px; font-weight: 600; }
.wii-bar button { width: 66px; height: 66px; }
/* Steam: the Library. Top links, game list on the left, the picked game's page on the right, a shelf of recent games. */
.st-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 26px; padding: 16px 28px 12px; }
.st-nav button { padding: 4px 0; border: 0; border-bottom: 3px solid transparent; background: none; color: #8f98a0; font: inherit; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.st-nav button:hover, .st-nav button.on { color: #fff; } .st-nav button.on { border-bottom-color: #1a9fff; color: #1a9fff; }
.st-nav span { margin-left: auto; color: #8f98a0; font-size: 13px; }
.st-body { flex: 1; display: flex; min-height: 0; }
.st-side { flex: none; width: min(280px, 38vw); display: flex; flex-direction: column; min-height: 0; background: #24282f; }
.st-side-h { margin: 10px; padding: 9px 12px; border-radius: 3px; background: #323944; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.st-side-s { padding: 6px 14px; background: linear-gradient(90deg, #2d333c, transparent); color: #8f98a0; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
#stList { flex: 1; overflow: auto; padding: 4px 0 8px; scrollbar-width: thin; scrollbar-color: #434953 transparent; }
.v-steam .g-tile { display: flex; justify-content: flex-start; gap: 10px; width: 100%; padding: 4px 14px; border: 0; background: none; color: #8f98a0; font-size: 13px; font-weight: 500; text-align: left; transition: none; }
.v-steam .g-tile .g-th { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 3px; background: #ffffff14 center / cover no-repeat; font-size: 12px; }
.v-steam .g-tile:hover { color: #fff; } .v-steam .g-tile.on { background: #3e4e69; color: #fff; }
.st-main { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: auto; background: #1b2838; scrollbar-width: thin; scrollbar-color: #434953 transparent; }
.st-hero { position: relative; flex: 0 0 clamp(170px, 40vh, 380px); display: flex; align-items: flex-end; padding: 22px 28px; overflow: hidden; background: #0e141b; }
.st-art { position: absolute; inset: 0; background: center 30% / cover no-repeat; }
.st-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0000 35%, #1b2838f2), linear-gradient(90deg, #0e141bcc, #0000 60%); }
.st-hero h2 { position: relative; margin: 0; color: #fff; font-size: clamp(26px, 4vw, 46px); font-weight: 800; text-shadow: 0 2px 12px #000; text-transform: capitalize; }
.st-act { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 28px; padding: 14px 28px; background: #2a3f5a80; box-shadow: 0 2px 8px #0006; }
.st-act span { display: grid; gap: 2px; } .st-act small { color: #8f98a0; font-size: 11px; font-weight: 700; letter-spacing: .08em; } .st-act b { color: #c7d5e0; font-size: 13px; font-weight: 500; }
.st-play { min-width: 170px; padding: 12px 30px; border: 0; border-radius: 3px; background: linear-gradient(90deg, #70d61d, #01a75b); color: #fff; font: inherit; font-size: 18px; font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.st-play:hover, .st-play:focus-visible { filter: brightness(1.15); outline: 0; }
.st-shelf-h { padding: 18px 28px 8px; color: #c7d5e0; font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.st-shelf { flex: none; display: flex; gap: 12px; padding: 6px 28px 22px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #434953 transparent; }
.st-shelf button { flex: 0 0 118px; aspect-ratio: 2 / 3; border: 0; border-radius: 3px; background: #16202d center / cover no-repeat; box-shadow: 0 4px 12px #0008; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.st-shelf button:hover, .st-shelf button:focus-visible { transform: translateY(-4px) scale(1.04); box-shadow: 0 10px 22px #000c, 0 0 0 2px #1a9fff; outline: 0; }
.st-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; color: #8f98a0; font-size: 12px; }
.st-bar button { padding: 0; border: 0; background: none; color: #8f98a0; font: inherit; font-weight: 700; cursor: pointer; } .st-bar button:hover, .st-bar button:focus-visible { color: #fff; outline: 0; }
/* Xbox: the current dashboard (dark, the picked game's art behind a row of tiles). Xbox 360: the light green mosaic. Both use .v-xbox. */
.xb-art, .xb-name { display: none; } body[data-iface="xbox"] .xb-art, body[data-iface="xbox"] .xb-name { display: block; }
.xb-art { position: absolute; inset: 0; background: center / cover no-repeat; filter: blur(18px) brightness(.6); transform: scale(1.15); }
.xb-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(#0e0e0eb3, #0000 35%, #0e0e0e 96%); }
.xb-tabs { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0 0 14px; padding: 0 max(36px, 6vw); }
.xb-tabs button { padding: 0; border: 0; background: none; color: #8a8f93; font: inherit; font-size: 28px; font-weight: 300; cursor: pointer; } .xb-tabs button.on, .xb-tabs button:hover { color: #1c1f21; }
body[data-iface="xbox"] .xb-tabs { gap: 8px; } body[data-iface="xbox"] .xb-tabs button { padding: 7px 18px; border-radius: 99px; background: #ffffff1f; color: #fff; font-size: 14px; font-weight: 600; text-transform: capitalize; }
body[data-iface="xbox"] .xb-tabs button:hover, body[data-iface="xbox"] .xb-tabs button:focus-visible { background: #ffffff40; color: #fff; outline: 0; } body[data-iface="xbox"] .xb-tabs button.on { background: #fff; color: #000; }
.xb-name { position: relative; z-index: 1; margin: auto max(36px, 6vw) 14px; overflow: hidden; font-size: clamp(22px, 3vw, 34px); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; text-shadow: 0 2px 10px #000; text-transform: capitalize; }
#xbGrid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; padding: 0 max(36px, 6vw) 18px; }
body[data-iface="x360"] #xbGrid { flex: 1; grid-auto-rows: 1fr; min-height: 0; max-height: 64vh; }
body[data-iface="x360"] .v-xbox .g-tile { border: 0; background: #107c10 center / cover no-repeat; color: #fff; outline: 4px solid transparent; outline-offset: 2px; }
body[data-iface="x360"] .v-xbox .g-tile:first-child { grid-column: span 2; grid-row: span 2; }
body[data-iface="x360"] .v-xbox .g-tile.on { outline-color: #5dc21e; transform: scale(1.02); z-index: 1; }
body[data-iface="xbox"] #xbGrid { width: min(100%, 150vh); gap: 12px; padding-bottom: 34px; }
body[data-iface="xbox"] .v-xbox .g-tile { aspect-ratio: 1; border: 0; border-radius: 6px; background: #2b2b2b center / cover no-repeat; color: #fff; outline: 3px solid transparent; outline-offset: 3px; box-shadow: 0 6px 18px #0008; }
body[data-iface="xbox"] .v-xbox .g-tile.g-app { aspect-ratio: auto; display: flex; justify-content: flex-start; gap: 12px; height: 64px; padding: 0 16px; background: #ffffff1f; box-shadow: none; }
body[data-iface="xbox"] .v-xbox .g-tile.g-app .g-ic { color: #9bf00b; font-size: 20px; }
body[data-iface="xbox"] .v-xbox .g-tile.on { outline-color: #fff; transform: scale(1.03); z-index: 1; }
/* DS: a white handheld with two 4:3 screens. Top: status bar and the picked game's banner. Bottom: a row of icon boxes with the name in a bubble. */
.v-ds { --dsw: min(88vw, calc((100dvh - 150px) * .6667)); flex: none; align-self: center; align-items: center; margin: auto; padding: 16px 26px; border-radius: 26px; background: linear-gradient(#fbfcfd, #d9dee4); color: #2a3340; box-shadow: 0 20px 50px #000a, inset 0 0 0 1px #fff; }
.ds-top, .ds-bottom { position: relative; display: flex; flex-direction: column; width: var(--dsw); aspect-ratio: 4 / 3; overflow: hidden; border: 5px solid #17191d; border-radius: 6px; }
.ds-hinge { width: calc(var(--dsw) + 30px); height: 16px; margin: 6px 0; border-radius: 8px; background: linear-gradient(#c9ced5, #f4f6f8 40%, #b7bdc5); box-shadow: inset 0 0 0 1px #aab1ba; }
.ds-top { background: #dfe9f3; }
.ds-status { display: flex; align-items: center; gap: 14px; padding: 5px 12px; border-bottom: 2px solid #9aa4b0; background: linear-gradient(#f6f8fa, #cfd6de); color: #3a4350; font-size: 13px; font-weight: 700; }
.ds-status span:first-child { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-batt { flex: none; width: 22px; height: 11px; border: 2px solid #3a4350; border-radius: 2px; background: linear-gradient(90deg, #3fbf4f 70%, transparent 70%); }
.ds-art { flex: 1; margin: 12px 12px 6px; border-radius: 4px; background: #223 center / cover no-repeat; box-shadow: 0 2px 8px #0005; }
.ds-top p { margin: 0 12px 8px; overflow: hidden; color: #4b5563; font-size: 12px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.ds-bottom { justify-content: center; background: linear-gradient(#fff 0 55%, #cfd5dc 55% 56%, #eef1f4 56%); }
.ds-bubble { align-self: center; max-width: 80%; padding: 6px 22px; overflow: hidden; border: 2px solid #9aa4b0; border-radius: 12px; background: #fff; font-size: clamp(13px, 2.4vh, 18px); font-weight: 700; white-space: nowrap; text-overflow: ellipsis; text-transform: capitalize; box-shadow: 0 2px 4px #0002; }
#dsGrid { display: flex; align-items: center; gap: calc(var(--dsw) * .04); padding: calc(var(--dsw) * .07) calc(var(--dsw) * .4 - 5px); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
#dsGrid::-webkit-scrollbar, #p5Row::-webkit-scrollbar, #gbList::-webkit-scrollbar { display: none; }
.v-ds .g-tile { flex: 0 0 calc(var(--dsw) * .2); aspect-ratio: 1; border: 2px solid #aeb7c2; border-radius: 12%; background: #fff center / cover no-repeat; color: #445; font-size: 10px; box-shadow: 0 2px 5px #0003; }
.v-ds .g-tile.on { border-color: #1fa5e8; box-shadow: 0 0 0 3px #1fa5e8, 0 4px 10px #0004; transform: scale(1.18); z-index: 1; }
.ds-track { flex: none; height: 8px; margin: 0 8%; border-radius: 4px; background: #c9d0d8; } .ds-track i { display: block; width: 12%; height: 100%; border-radius: 4px; background: #1fa5e8; transition: margin-left .15s; }
/* PS5: the picked game's art fills the screen; a row of small icons up top, the title and Play at the bottom */
.p5-art { position: absolute; inset: 0; background: center / cover no-repeat; filter: blur(14px) brightness(.65); transform: scale(1.12); }
.p5-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #05070dd9, #0000 70%), linear-gradient(0deg, #05070d, #0000 55%); }
.p5-tabs { position: relative; z-index: 1; display: flex; align-items: center; gap: 22px; padding: 26px 6vw 18px; }
.p5-tabs button { padding: 0; border: 0; background: none; color: #ffffff99; font: inherit; font-size: 20px; cursor: pointer; } .p5-tabs button:hover, .p5-tabs button:focus-visible, .p5-tabs button.on { color: #fff; outline: 0; } .p5-tabs button.on { font-weight: 600; }
.p5-tabs button.ic { width: 36px; height: 36px; border-radius: 50%; font-size: 18px; } .p5-tabs button.ic:hover, .p5-tabs button.ic:focus-visible { background: #ffffff26; }
.p5-tabs i { flex: 1; } .p5-tabs span { font-size: 18px; }
#p5Row { position: relative; z-index: 1; flex: none; display: flex; align-items: flex-start; gap: 10px; height: 150px; padding: 8px 6vw; overflow-x: auto; scrollbar-width: none; }
.v-ps5 .g-tile { flex: 0 0 78px; height: 78px; border: 0; border-radius: 12px; background: #1c2233 center / cover no-repeat; color: #fff; outline: 2px solid transparent; outline-offset: 3px; transition: flex-basis .18s, height .18s, outline-color .18s; }
.v-ps5 .g-tile .g-lb { display: none; } .v-ps5 .g-tile .g-ic { font-size: 24px; }
.v-ps5 .g-tile.on { flex-basis: 128px; height: 128px; outline-color: #fff; }
.p5-info { position: relative; z-index: 1; margin-top: auto; padding: 0 6vw 7vh; }
.p5-info h2 { margin: 0; font-size: clamp(30px, 5vw, 56px); font-weight: 300; text-shadow: 0 2px 16px #000; text-transform: capitalize; }
.p5-info p { margin: 6px 0 22px; color: #ffffffb3; font-size: 15px; }
.p5-play { padding: 14px 64px; border: 0; border-radius: 99px; background: #fff; color: #000; font: inherit; font-size: 17px; font-weight: 600; cursor: pointer; }
.p5-play:hover, .p5-play:focus-visible { box-shadow: 0 0 0 3px #05070d, 0 0 0 5px #fff; outline: 0; }
/* Game Boy: a grey shell around a four-shade green screen with a text menu */
.v-gb { align-items: center; justify-content: center; padding: 14px; font-family: var(--mono); }
.gb-shell { display: flex; flex-direction: column; width: min(720px, 100%); height: min(100%, 640px); padding: 22px 26px 16px; border-radius: 14px 14px 64px 14px; background: linear-gradient(#cfccc4, #b9b6ad); box-shadow: 0 20px 50px #000a, inset 0 2px 0 #ffffff80, inset 0 -6px 0 #0002; }
.gb-bezel { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; padding: 26px 44px 22px; border-radius: 10px 10px 44px 10px; background: #5d5f70; }
.gb-bezel em { position: absolute; top: 7px; left: 0; right: 0; color: #d8d8e4; font-size: 9px; font-style: normal; letter-spacing: .12em; text-align: center; }
.gb-led { position: absolute; top: 38%; left: 14px; width: 9px; height: 9px; border-radius: 50%; background: #e0263c; box-shadow: 0 0 8px #e0263c; }
.gb-lcd { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #9bbc0f; color: #0f380f; box-shadow: inset 0 0 0 3px #306230, inset 0 0 30px #0f380f55; }
.gb-head { display: flex; justify-content: space-between; padding: 10px 14px; border-bottom: 3px solid #0f380f; font-weight: 800; letter-spacing: .1em; }
#gbList { flex: 1; overflow: auto; padding: 6px 0; scrollbar-width: none; }
.v-gb .g-tile { display: flex; justify-content: flex-start; width: 100%; padding: 5px 14px 5px 32px; border: 0; background: none; color: #0f380f; font-family: inherit; font-size: 15px; font-weight: 800; text-align: left; transition: none; }
.v-gb .g-tile .g-th { display: none; } .v-gb .g-tile .g-lb { text-transform: uppercase; }
.v-gb .g-tile.on { background: #0f380f; color: #9bbc0f; } .v-gb .g-tile.on::before { content: "▶"; position: absolute; left: 12px; }
.gb-foot { padding: 8px 14px; overflow: hidden; border-top: 3px solid #0f380f; font-size: 12px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; text-transform: uppercase; }
.gb-brand { padding: 10px 6px 0; color: #2c2f7a; font-size: 20px; font-style: italic; font-weight: 800; } .gb-brand small { margin-left: 8px; font-size: 11px; font-style: normal; letter-spacing: .1em; }
.iface-prev.p-wii { flex-wrap: wrap; align-content: center; justify-content: center; background: #eef1f4; } .iface-prev.p-wii i { width: 20%; height: 26px; border: 2px solid #fff; border-radius: 6px; background: #cfd5dc; box-shadow: 0 0 0 1px #b9c0c8; } .iface-prev.p-wii i:first-child { box-shadow: 0 0 0 2px #35b5e9; }
.iface-prev.p-steam { background: linear-gradient(#1b2838, #171a21); } .iface-prev.p-steam b { display: grid; align-content: start; gap: 5px; width: 30%; } .iface-prev.p-steam b i { height: 6px; } .iface-prev.p-steam b i:first-child { background: #fff; }
.iface-prev.p-steam > i { flex: 1; background: linear-gradient(135deg, #2a475e, #1b2838); position: relative; } .iface-prev.p-steam > i::after { content: ""; position: absolute; left: 8px; bottom: 8px; width: 34px; height: 10px; border-radius: 2px; background: #8bc34a; }
.iface-prev.p-x360 { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: 1fr 1fr; background: #e6e9eb; } .iface-prev.p-x360 i { border-radius: 0; background: #107c10; } .iface-prev.p-x360 i:first-child { grid-column: span 2; grid-row: span 2; background: #5dc21e; }
.iface-prev.p-ds { flex-direction: column; align-items: center; background: #c9d2dd; } .iface-prev.p-ds i { flex: 1; width: 62%; border: 2px solid #2b3038; border-radius: 5px; background: #fff; } .iface-prev.p-ds i:first-child { background: #445a78; }
.iface-prev.p-xbox { align-items: flex-end; background: linear-gradient(135deg, #1d3a1d, #0e0e0e 70%); } .iface-prev.p-xbox i { flex: 1; aspect-ratio: 1; background: #3a3a3a; } .iface-prev.p-xbox i:first-child { outline: 2px solid #fff; outline-offset: 1px; background: #107c10; }
.iface-prev.p-ps5 { flex-direction: column; background: linear-gradient(135deg, #24306b, #05070d 75%); } .iface-prev.p-ps5 b { display: flex; align-items: flex-start; gap: 4px; } .iface-prev.p-ps5 b i { width: 14px; height: 14px; } .iface-prev.p-ps5 b i:first-child { width: 26px; height: 26px; outline: 1px solid #fff; outline-offset: 1px; }
.iface-prev.p-ps5 > i { width: 44px; height: 12px; margin-top: auto; border-radius: 99px; background: #fff; }
.iface-prev.p-gb { flex-direction: column; gap: 5px; padding: 14px 26px; background: #9bbc0f; box-shadow: inset 0 0 0 9px #5d5f70; } .iface-prev.p-gb i { height: 9px; border-radius: 0; background: #306230; } .iface-prev.p-gb i:first-child { background: #0f380f; }
.ch-top { position: relative; z-index: 2; display: flex; align-items: center; gap: 16px; padding: 22px 36px; }
.ch-avatar { width: 42px; height: 42px; border: 0; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--violet)); color: #06101c; font-size: 17px; font-weight: 800; cursor: pointer; }
.ch-spacer { flex: 1; }
.ch-clock { font-size: 17px; font-weight: 600; }
.ch-net { color: #9fb2d0; font: 11px var(--mono); }
.ch-switch { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; padding-bottom: 4vh; }
.ch-title { height: 24px; margin: 0 0 10px; padding-left: max(36px, 8vw); overflow: hidden; color: var(--cyan); font-size: 18px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; text-transform: capitalize; }
.ch-tiles { display: flex; gap: 12px; padding: 10px max(36px, 8vw); overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.ch-tiles::-webkit-scrollbar { display: none; }
.ch-tile { position: relative; flex: 0 0 auto; width: clamp(130px, 24vh, 230px); aspect-ratio: 1; padding: 10px; border: 0; border-radius: 4px; background: #1a1f2e center / cover no-repeat; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; outline: 3px solid transparent; outline-offset: 4px; transition: outline-color .15s, transform .15s; }
.ch-tile.on { outline-color: var(--cyan); transform: scale(1.02); }
.ch-dock { display: flex; justify-content: center; gap: 14px; margin-top: 30px; padding-bottom: 22px; }
.ch-dock button { position: relative; width: 52px; height: 52px; border: 0; border-radius: 50%; background: #ffffff14; color: var(--cyan); font-size: 20px; cursor: pointer; transition: .15s; }
.ch-dock button:hover, .ch-dock button:focus-visible { background: var(--cyan); color: #06101c; outline: 0; transform: translateY(-3px); }
.ch-dock button::after { content: attr(data-label); position: absolute; top: 60px; left: 50%; transform: translateX(-50%); color: #dfe8f7; font-size: 11px; white-space: nowrap; opacity: 0; transition: opacity .15s; }
.ch-dock button:hover::after, .ch-dock button:focus-visible::after { opacity: 1; }
.ch-foot { position: relative; z-index: 2; display: flex; justify-content: flex-end; gap: 22px; margin: 0 24px; padding: 14px 12px 18px; border-top: 1px solid #ffffff40; color: #dfe8f7; font-size: 13px; }
.ch-foot kbd { padding: 1px 7px; border-radius: 99px; background: #fff; color: #06101c; font: 700 11px var(--mono); }
.ch-xmb { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.xmb-wave { position: absolute; top: 26%; left: -10%; width: 120%; height: 52%; opacity: .55; pointer-events: none; animation: xmbWave 12s ease-in-out infinite alternate; }
@keyframes xmbWave { to { transform: translateY(16px) scaleY(1.22); } }
@media (prefers-reduced-motion: reduce) { .xmb-wave { animation: none; } }
.xmb-cats { position: absolute; top: 22%; left: 0; display: flex; transition: transform .28s var(--ease); }
.xmb-cat { flex: 0 0 150px; display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: #fff; font-size: 13px; opacity: .45; cursor: pointer; transition: opacity .25s; }
.xmb-cat .ic { font-size: 44px; line-height: 1; filter: drop-shadow(0 2px 6px #0008); transition: transform .25s var(--ease); }
.xmb-cat .lb { opacity: 0; transition: opacity .25s; }
.xmb-cat.on { opacity: 1; } .xmb-cat.on .ic { transform: scale(1.3); } .xmb-cat.on .lb { opacity: 1; }
.xmb-items { position: absolute; top: calc(22% + 108px); left: 0; display: grid; transition: transform .28s var(--ease); }
.xmb-item { display: flex; align-items: center; gap: 16px; height: 68px; padding: 0; border: 0; background: none; color: #fff; text-align: left; white-space: nowrap; opacity: .5; cursor: pointer; transition: opacity .2s; }
.xmb-item .th { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 8px; background: #ffffff1a center / cover no-repeat; font-size: 22px; }
.xmb-item b { display: block; font-size: 17px; font-weight: 500; text-transform: capitalize; transition: font-size .2s; } .xmb-item small { color: #c9d6ee; font-size: 12px; }
.xmb-item.on { opacity: 1; } .xmb-item.on b { font-size: 21px; text-shadow: 0 0 14px #fff8; }
.xmb-item.past { opacity: 0; pointer-events: none; }
.iface-pick { position: fixed; inset: 0; z-index: 380; display: grid; place-items: center; padding: 20px; background: rgba(3,6,14,.93); }
.iface-box { width: min(860px, 100%); max-height: 92vh; overflow: auto; padding: 28px; border: 1px solid #ffffff1f; border-radius: 20px; background: linear-gradient(160deg, var(--panel2), var(--panel)); }
.iface-box h2 { margin: 0 0 6px; font-size: 26px; } .iface-box > p { margin: 0 0 20px; color: #9fb2d0; font-size: 13px; }
/* Join-our-Discord popup */
.discord-box { position: relative; width: min(460px, 100%); text-align: center; }
.discord-box > p.discord-note { margin: -8px 0 16px; color: #f5b955; min-height: 0; }
.discord-close { position: absolute; top: 12px; right: 14px; background: none; border: 0; color: #9fb2d0; font-size: 16px; cursor: pointer; }
.discord-close:hover { color: #fff; }
.discord-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.discord-join { display: inline-block; padding: 10px 18px; border-radius: 10px; background: #5865f2; color: #fff; font-weight: 600; text-decoration: none; }
.discord-join:hover { background: #4752c4; }
.discord-code { display: flex; gap: 8px; margin-top: 16px; }
.discord-code input { flex: 1; min-width: 0; background: #0f1826; border: 1px solid #22324a; border-radius: 8px; color: inherit; padding: 8px 10px; font: inherit; font-size: 12px; }
.iface-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.iface-card { padding: 12px; border: 1px solid #ffffff1f; border-radius: 14px; background: #ffffff08; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.iface-card:hover, .iface-card:focus-visible { border-color: var(--cyan); outline: 0; } .iface-card.on { border-color: var(--cyan); box-shadow: 0 0 0 2px var(--cyan) inset; }
.iface-card strong { display: block; font-size: 14px; } .iface-card small { color: #8498b7; font-size: 11px; }
.iface-prev { position: relative; display: flex; gap: 5px; height: 96px; margin-bottom: 10px; padding: 10px; border-radius: 9px; background: #070b16; overflow: hidden; }
.iface-prev i { display: block; border-radius: 3px; background: #ffffff26; }
.iface-prev.p-default { align-items: stretch; } .iface-prev.p-default i:first-child { width: 18%; } .iface-prev.p-default i:last-child { flex: 1; background: linear-gradient(135deg, var(--cyan), var(--violet)); opacity: .55; }
.iface-prev.p-switch { align-items: center; flex-wrap: wrap; align-content: center; justify-content: center; } .iface-prev.p-switch i { width: 22%; aspect-ratio: 1; } .iface-prev.p-switch i:first-child { outline: 2px solid var(--cyan); outline-offset: 2px; background: #e5484d; } .iface-prev.p-switch i:nth-child(2) { background: #4c6ef5; } .iface-prev.p-switch i:nth-child(3) { background: #2f9e6d; }
.iface-prev.p-switch u { flex-basis: 100%; height: 0; } .iface-prev.p-switch i:nth-child(n+5) { width: 8px; height: 8px; aspect-ratio: auto; border-radius: 50%; margin-top: 4px; }
.iface-prev.p-ps3 { flex-direction: column; background: linear-gradient(160deg, color-mix(in srgb, var(--cyan) 35%, #04060d), #04060d 60%, color-mix(in srgb, var(--violet) 40%, #04060d)); } .iface-prev.p-ps3 b { display: flex; gap: 12px; margin: 8px 0 4px 20%; } .iface-prev.p-ps3 b i { width: 12px; height: 12px; border-radius: 50%; } .iface-prev.p-ps3 b i:first-child { background: #fff; transform: scale(1.3); }
.iface-prev.p-ps3 > i { width: 44%; height: 7px; margin-left: 20%; } .iface-prev.p-ps3 > i:nth-of-type(1) { background: #fff; width: 52%; }
.iface-actions { display: flex; justify-content: flex-end; margin-top: 20px; }

/* CONSOLE THEMES ON THE ARCADE AND BROWSER: body.console is set for every interface except Default.
   Each theme supplies a palette (--t-*); the shared rules below paint the Arcade and Browser with it,
   then each theme adds its own shapes (Switch's All Software grid, PS3's list, Steam's capsules...). */
body[data-iface="switch"] { --t-bg: #2d2d2d; --t-bar: #2d2d2d; --t-fg: #fff; --t-muted: #a8a8a8; --t-accent: #00c3e3; --t-on: #00242b; --t-card: #3d3d3d; --t-line: #5a5a5a; --t-input: #3a3a3a; --t-radius: 2px; }
body[data-iface="ps3"] { --t-bg: radial-gradient(120% 70% at 50% 55%, #3f8fe0, #1a4fb0 42%, #081a52); --t-bar: #0a1c4e; --t-fg: #fff; --t-muted: #c5d6f5; --t-accent: #fff; --t-on: #0a1c4e; --t-card: #ffffff14; --t-line: #ffffff33; --t-input: #00000040; --t-radius: 6px; }
body[data-iface="wii"] { --t-bg: repeating-linear-gradient(#f5f7f9 0 3px, #eceff2 3px 6px); --t-bar: #e4e8ec; --t-fg: #4a4f57; --t-muted: #7b8490; --t-accent: #35b5e9; --t-on: #fff; --t-card: #fff; --t-line: #c3cad2; --t-input: #fff; --t-radius: 18px; }
body[data-iface="steam"] { --t-bg: #1b2838; --t-bar: #171a21; --t-fg: #c7d5e0; --t-muted: #8f98a0; --t-accent: #1a9fff; --t-on: #fff; --t-card: #16202d; --t-line: #2a475e; --t-input: #101822; --t-radius: 4px; }
body[data-iface="x360"] { --t-bg: radial-gradient(circle at 50% 30%, #fbfbfb, #cdd2d5); --t-bar: #eceeef; --t-fg: #1c1f21; --t-muted: #6a7075; --t-accent: #107c10; --t-on: #fff; --t-card: #107c10; --t-line: #c2c7ca; --t-input: #fff; --t-radius: 0px; }
body[data-iface="ds"] { --t-bg: linear-gradient(#e3e9f0, #b7c2d0); --t-bar: #dfe6ee; --t-fg: #2a3340; --t-muted: #6b7786; --t-accent: #ff7a1a; --t-on: #fff; --t-card: #fff; --t-line: #b4bfcc; --t-input: #fff; --t-radius: 14px; }
body[data-iface="xbox"] { --t-bg: radial-gradient(circle at 70% 0, #1d3a1d, #0e0e0e 60%); --t-bar: #0e0e0e; --t-fg: #fff; --t-muted: #a0a0a0; --t-accent: #107c10; --t-on: #fff; --t-card: #2b2b2b; --t-line: #3a3a3a; --t-input: #1f1f1f; --t-radius: 6px; }
body[data-iface="ps5"] { --t-bg: linear-gradient(160deg, #1a2350, #05070d 60%); --t-bar: #05070d; --t-fg: #fff; --t-muted: #a9b0c4; --t-accent: #fff; --t-on: #000; --t-card: #151a2b; --t-line: #2a3150; --t-input: #0d1120; --t-radius: 12px; }
body[data-iface="psp"] { --t-bg: linear-gradient(165deg, #0d5f4d, #1fb58a 40%, #0a7a62 60%, #053d33); --t-bar: #06392f; --t-fg: #fff; --t-muted: #c9efe3; --t-accent: #fff; --t-on: #06392f; --t-card: #ffffff14; --t-line: #ffffff33; --t-input: #00000040; --t-radius: 6px; }
body[data-iface="gb"] { --t-bg: #9bbc0f; --t-bar: #8bac0f; --t-fg: #0f380f; --t-muted: #306230; --t-accent: #0f380f; --t-on: #9bbc0f; --t-card: #8bac0f; --t-line: #306230; --t-input: #8bac0f; --t-radius: 0px; }
.arc-bar, .arc-foot { display: none; }
body.console[data-page="gamesPage"] .topbar, body.console[data-page="gamesPage"] .sidebar { display: none; }
body.console[data-page="gamesPage"] .app-frame { display: block; }
body.console[data-page="gamesPage"] .main { height: 100vh; height: 100dvh; padding: 0 clamp(20px, 5vw, 70px) 76px; background: var(--t-bg); color: var(--t-fg); }
body.console #gamesPage .page-head h1, body.console #gamesPage .page-head p, body.console #gamesPage .game-badge { display: none; }
body.console #gamesPage .page-head { position: static; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
body.console #gamesPage .arc-bar { position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 14px; margin: 0 calc(-1 * clamp(20px, 5vw, 70px)) 16px; padding: 18px clamp(20px, 5vw, 70px) 14px; border-bottom: 1px solid var(--t-line); background: var(--t-bar); }
.arc-bar button { width: 40px; height: 40px; border: 1px solid var(--t-line); border-radius: 50%; background: var(--t-input); color: var(--t-fg); font-size: 22px; line-height: 1; cursor: pointer; }
.arc-bar button:hover, .arc-bar button:focus-visible { border-color: var(--t-accent); outline: 0; }
.arc-bar strong { font-size: 24px; font-weight: 500; } .arc-bar small { color: var(--t-muted); font-size: 13px; }
body.console[data-page="gamesPage"] .arc-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; justify-content: flex-end; gap: 22px; padding: 14px 36px 16px; border-top: 1px solid var(--t-line); background: var(--t-bar); color: var(--t-fg); font-size: 13px; }
.arc-foot kbd { padding: 1px 8px; border-radius: 99px; background: var(--t-fg); color: var(--t-bar); font: 700 11px var(--mono); }
body.console #gamesPage .game-filter, body.console #gamesPage .game-add input { border-color: var(--t-line); background: var(--t-input); color: var(--t-fg); }
body.console #gamesPage .game-filter:focus, body.console #gamesPage .game-add input:focus { border-color: var(--t-accent); }
body.console #gamesPage .game-chip { border-color: var(--t-line); background: var(--t-input); color: var(--t-muted); }
body.console #gamesPage .game-chip:hover { border-color: var(--t-accent); color: var(--t-fg); }
body.console #gamesPage .game-chip.on, body.console #gamesPage .game-add button, body.console #gamesPage .game-play { border-color: transparent; background: var(--t-accent); color: var(--t-on); box-shadow: none; }
body.console #gamesPage .game-card { border-color: var(--t-line); border-radius: var(--t-radius); background: var(--t-card); box-shadow: none; }
body.console #gamesPage .game-card::before, body.console #gamesPage .game-card::after { display: none; }
body.console #gamesPage .game-card h3 { color: var(--t-fg); } body.console #gamesPage .game-card p { color: var(--t-muted); }
body.console #gamesPage .game-card:hover, body.console #gamesPage .game-card:focus-visible { transform: none; border-color: var(--t-accent); box-shadow: 0 0 0 3px var(--t-accent); }
body.console #gamesPage .empty-card { border-color: var(--t-line); background: var(--t-card); color: var(--t-muted); }
/* Switch: "All Software" — a wall of square covers; the name pops up over the one you point at */
body[data-iface="switch"] #gamesPage .game-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px; padding-top: 30px; }
body[data-iface="switch"] #gamesPage .game-card { aspect-ratio: 1; border: 0; overflow: visible; content-visibility: visible; }
body[data-iface="switch"] #gamesPage .game-art { position: absolute; inset: 0; height: auto; }
body[data-iface="switch"] #gamesPage .game-body { position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 5; max-width: 240px; padding: 3px 12px; overflow: hidden; border-radius: 3px; background: #2d2d2d; transform: translateX(-50%); white-space: nowrap; text-overflow: ellipsis; opacity: 0; pointer-events: none; }
body[data-iface="switch"] #gamesPage .game-body h3 { overflow: hidden; color: #00c3e3; font-size: 15px; font-weight: 500; text-overflow: ellipsis; } body[data-iface="switch"] #gamesPage .game-body p, body[data-iface="switch"] #gamesPage .game-play { display: none; }
body[data-iface="switch"] #gamesPage .game-card:hover, body[data-iface="switch"] #gamesPage .game-card:focus-visible { z-index: 4; box-shadow: 0 0 0 3px #2d2d2d, 0 0 0 7px #00c3e3, 0 0 22px 6px #00c3e388; animation: swPulse 1.1s ease-in-out infinite alternate; }
body[data-iface="switch"] #gamesPage .game-card:hover .game-body, body[data-iface="switch"] #gamesPage .game-card:focus-visible .game-body { opacity: 1; }
@keyframes swPulse { to { box-shadow: 0 0 0 3px #2d2d2d, 0 0 0 7px #5ff2e3, 0 0 26px 8px #5ff2e388; } }
/* PS3: one long list, icon on the left, title beside it */
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-list { grid-template-columns: 1fr; gap: 2px; max-width: 860px; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-card { flex-direction: row; align-items: center; gap: 0; border: 0; border-radius: 0; background: none; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-art { flex: 0 0 104px; height: 58px; border-radius: 6px; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-body { padding: 8px 18px; } body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-body h3 { font-size: 18px; font-weight: 400; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-card:hover, body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-card:focus-visible { background: linear-gradient(90deg, #ffffff30, transparent); box-shadow: none; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-card:hover h3 { text-shadow: 0 0 14px #fff; }
body:is([data-iface="ps3"], [data-iface="psp"]) #gamesPage .game-play { top: 50%; bottom: auto; transform: translateY(-50%); }
/* Wii: fat white channels */
body[data-iface="wii"] #gamesPage .game-list { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
body[data-iface="wii"] #gamesPage .game-card { border: 3px solid #fff; box-shadow: 0 2px 8px #0003, inset 0 0 0 1px #c9ced4; }
body[data-iface="wii"] #gamesPage .game-card:hover, body[data-iface="wii"] #gamesPage .game-card:focus-visible { border-color: #fff; box-shadow: 0 0 0 4px #35b5e9, 0 0 20px #35b5e9aa; transform: scale(1.03); }
body[data-iface="wii"][data-page="gamesPage"] .arc-foot { border-top: 3px solid #35b5e9; border-radius: 50% 50% 0 0 / 20px 20px 0 0; background: linear-gradient(#e4e8ec, #c6ccd3); }
/* Steam: portrait capsules that lift when you point at them */
body[data-iface="steam"] #gamesPage .game-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
body[data-iface="steam"] #gamesPage .game-card { border: 0; box-shadow: 0 4px 14px #0008; }
body[data-iface="steam"] #gamesPage .game-art { height: auto; aspect-ratio: 2 / 3; }
body[data-iface="steam"] #gamesPage .game-body { padding: 8px 10px 10px; } body[data-iface="steam"] #gamesPage .game-body h3 { font-size: 13px; }
body[data-iface="steam"] #gamesPage .game-card:hover, body[data-iface="steam"] #gamesPage .game-card:focus-visible { transform: translateY(-6px) scale(1.04); box-shadow: 0 14px 30px #000c, 0 0 0 2px #1a9fff; }
body[data-iface="steam"] #gamesPage .game-play { background: linear-gradient(#a4d007, #5c7e10); color: #fff; border-radius: 3px; }
/* Xbox: square green tiles */
body[data-iface="x360"] #gamesPage .game-list { gap: 8px; }
body[data-iface="x360"] #gamesPage .game-card { border: 0; } body[data-iface="x360"] #gamesPage .game-card h3 { color: #fff; } body[data-iface="x360"] #gamesPage .game-card p { color: #d2ecd2; }
body[data-iface="x360"] #gamesPage .game-card:hover, body[data-iface="x360"] #gamesPage .game-card:focus-visible { box-shadow: 0 0 0 4px #5dc21e; transform: scale(1.02); }
body[data-iface="x360"] #gamesPage .game-play { background: #fff; color: #107c10; border-radius: 0; }
body[data-iface="x360"] .arc-bar strong { font-size: 30px; font-weight: 300; text-transform: lowercase; }
/* DS: small rounded icons inside a screen bezel */
body[data-iface="ds"] #gamesPage .game-list { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; padding: 16px; border: 6px solid #2b3038; border-radius: 14px; background: repeating-linear-gradient(#fbfcfd 0 2px, #f0f3f6 2px 4px); }
body[data-iface="ds"] #gamesPage .game-card { border: 0; box-shadow: 0 2px 6px #0003; } body[data-iface="ds"] #gamesPage .game-art { height: 96px; }
body[data-iface="ds"] #gamesPage .game-body { padding: 8px 10px 10px; } body[data-iface="ds"] #gamesPage .game-body h3 { font-size: 12px; } body[data-iface="ds"] #gamesPage .game-body p, body[data-iface="ds"] #gamesPage .game-play { display: none; }
body[data-iface="ds"] #gamesPage .game-card:hover, body[data-iface="ds"] #gamesPage .game-card:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #ff7a1a; transform: scale(1.04); }
/* Xbox: dark tiles with a white focus ring. PS5: rounded cards. Game Boy: green screen, mono type. */
body[data-iface="xbox"] #gamesPage .game-card { border: 0; } body[data-iface="xbox"] #gamesPage .game-card:hover, body[data-iface="xbox"] #gamesPage .game-card:focus-visible { box-shadow: 0 0 0 3px #fff; transform: scale(1.02); }
body[data-iface="ps5"] #gamesPage .game-list { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } body[data-iface="ps5"] #gamesPage .game-play { border-radius: 99px; }
body[data-iface="ps5"] #gamesPage .game-card:hover, body[data-iface="ps5"] #gamesPage .game-card:focus-visible { box-shadow: 0 0 0 2px #05070d, 0 0 0 4px #fff; transform: scale(1.03); }
body[data-iface="gb"][data-page="gamesPage"] .main, body[data-iface="gb"] #gamesPage :is(h3, input, button), body[data-iface="gb"] #browserPage :is(input, button) { font-family: var(--mono); }
body[data-iface="gb"] #gamesPage .game-card { border: 2px solid #0f380f; } body[data-iface="gb"] #gamesPage .game-card h3 { font-weight: 800; text-transform: uppercase; }
body[data-iface="gb"] #gamesPage .game-art { filter: grayscale(1) contrast(1.4); mix-blend-mode: multiply; }
body[data-iface="gb"] #gamesPage .game-card:hover, body[data-iface="gb"] #gamesPage .game-card:focus-visible { background: #306230; box-shadow: none; } body[data-iface="gb"] #gamesPage .game-card:hover :is(h3, p), body[data-iface="gb"] #gamesPage .game-card:focus-visible :is(h3, p) { color: #9bbc0f; }
/* Browser, shared */
body.console #browserPage, body.console #browserViewport, body.console #browserEmpty { background: var(--t-bg); }
body.console #browserEmpty { color: var(--t-muted); } body.console #browserEmpty strong { color: var(--t-fg); }
body.console .browser-tabs, body.console .browser-toolbar { border-bottom-color: var(--t-line); background: var(--t-bar); }
body.console .browser-tab { border-color: var(--t-line); background: var(--t-input); color: var(--t-muted); }
body.console .browser-tab.active { border-color: var(--t-accent); background: var(--t-card); color: var(--t-fg); }
body.console .browser-newtab, body.console .browser-toolbar > button { border-color: var(--t-line); background: var(--t-input); color: var(--t-fg); }
body.console .browser-newtab:hover, body.console .browser-toolbar > button:hover { border-color: var(--t-accent); background: var(--t-input); }
body.console .address-form { border-color: var(--t-line); background: var(--t-input); } body.console .address-form:focus-within { border-color: var(--t-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--t-accent) 30%, transparent); }
body.console #urlInput { color: var(--t-fg); } body.console #urlInput::placeholder, body.console .address-form > span, body.console .address-form button { color: var(--t-muted); }
/* Browser, per theme */
body[data-iface="xbox"] .browser-tab.active { border-color: transparent; background: #107c10; color: #fff; } body[data-iface="xbox"] .browser-toolbar > button { border: 0; border-radius: 50%; background: #2b2b2b; } body[data-iface="xbox"] .address-form { border-radius: 99px; }
body[data-iface="ps5"] .browser-tab { border-radius: 10px 10px 0 0; } body[data-iface="ps5"] .browser-toolbar > button { border: 0; border-radius: 50%; background: #ffffff1a; } body[data-iface="ps5"] .address-form { border-radius: 99px; }
body[data-iface="gb"] :is(.browser-tab, .address-form, .browser-toolbar > button, .browser-newtab) { border-width: 2px; border-radius: 0; }
body[data-iface="switch"] .browser-shell { grid-template-rows: 44px 56px minmax(0, 1fr); }
body[data-iface="switch"] .browser-tab { border-radius: 0; } body[data-iface="switch"] .browser-tab.active { border-color: transparent; box-shadow: inset 0 -3px #00c3e3; background: #3d3d3d; }
body[data-iface="switch"] .browser-toolbar { gap: 10px; padding: 8px 16px; } body[data-iface="switch"] .browser-toolbar > button { flex-basis: 40px; height: 40px; border: 0; background: #4b4b4b; color: #00c3e3; }
body[data-iface="switch"] .address-form { height: 40px; border-radius: 99px; }
body:is([data-iface="ps3"], [data-iface="psp"]) .browser-tabs, body:is([data-iface="ps3"], [data-iface="psp"]) .browser-toolbar { background: linear-gradient(#4a4f5a, #16181d 48%, #05060a 52%, #1b1e25); border-bottom-color: #000; }
body:is([data-iface="ps3"], [data-iface="psp"]) .browser-tab { border-radius: 4px 4px 0 0; background: #ffffff12; border-color: #ffffff26; } body:is([data-iface="ps3"], [data-iface="psp"]) .browser-tab.active { background: #ffffff30; border-color: #ffffff80; }
body:is([data-iface="ps3"], [data-iface="psp"]) .browser-toolbar > button { background: linear-gradient(#5a606c, #23262d); border-color: #000; } body:is([data-iface="ps3"], [data-iface="psp"]) .address-form { background: #000a; border-color: #ffffff40; border-radius: 4px; }
body[data-iface="wii"] .browser-shell { grid-template-rows: 44px 60px minmax(0, 1fr); }
body[data-iface="wii"] .browser-toolbar { gap: 10px; padding: 8px 16px; border-bottom: 3px solid #35b5e9; background: linear-gradient(#f3f5f7, #cfd5db); }
body[data-iface="wii"] .browser-toolbar > button { flex-basis: 44px; height: 44px; border: 3px solid #35b5e9; background: #fff; color: #5a626d; font-size: 18px; box-shadow: 0 2px 5px #0003; }
body[data-iface="wii"] .address-form { height: 42px; border-width: 2px; border-radius: 99px; } body[data-iface="wii"] .browser-tab { border-radius: 14px 14px 0 0; }
body[data-iface="steam"] .browser-tab { border: 0; border-radius: 3px 3px 0 0; background: #24282f; } body[data-iface="steam"] .browser-tab.active { background: #3d4450; box-shadow: inset 0 2px #1a9fff; }
body[data-iface="steam"] .browser-toolbar > button { border: 0; border-radius: 3px; background: #2a475e; color: #66c0f4; } body[data-iface="steam"] .address-form { border-radius: 3px; }
body[data-iface="x360"] .browser-tab { border: 0; border-radius: 0; background: #d5d9dc; } body[data-iface="x360"] .browser-tab.active { background: #107c10; color: #fff; }
body[data-iface="x360"] .browser-toolbar > button, body[data-iface="x360"] .browser-newtab { border: 0; border-radius: 0; background: #107c10; color: #fff; } body[data-iface="x360"] .address-form { border-radius: 0; }
body[data-iface="ds"] #browserViewport { margin: 8px; border: 6px solid #2b3038; border-radius: 14px; } body[data-iface="ds"] .browser-toolbar > button { border-radius: 10px; }
body[data-iface="ds"] .browser-tab { border-radius: 10px 10px 0 0; } body[data-iface="ds"] .address-form { border-radius: 10px; }
.game-card:hover, .game-card:focus-visible { transform: translateY(-6px); border-color: var(--cyan); box-shadow: 0 24px 46px -22px var(--cyan); outline: 0; }
.game-art { position: relative; display: grid; place-items: center; height: 118px; overflow: hidden; background-size: cover; background-position: center; }
.game-emoji { font-size: 46px; filter: drop-shadow(0 8px 16px #0009); transition: transform .35s var(--ease); }
.game-card:hover .game-emoji { transform: scale(1.2) rotate(-7deg); }
.game-art.has-img .game-emoji { display: none; }
.game-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.game-chip { height: 30px; padding: 0 13px; border: 1px solid #2d3d59; border-radius: 99px; background: #090f1e; color: var(--muted); font-size: 12px; text-transform: capitalize; cursor: pointer; transition: .2s var(--ease); }
.game-chip:hover, .game-chip:focus-visible { border-color: var(--cyan); color: var(--text); outline: 0; }
.game-chip.on { border-color: transparent; background: linear-gradient(110deg, var(--cyan), var(--violet)); color: #06101c; font-weight: 700; }
.game-badge { position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 99px; background: #000a; color: var(--cyan); font: 700 9px var(--mono); letter-spacing: .08em; }
.game-card:has(.game-remove) .game-badge { display: none; }
.game-art.is-cover { background-size: cover, cover; transition: background-size .35s var(--ease); }
.game-art.is-logo { padding: 16px 22px; background-size: contain, cover; background-origin: content-box, border-box; background-repeat: no-repeat; background-position: center; }
.game-art.is-logo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle, #0006, transparent 70%); z-index: -1; }
.game-fav { position: absolute; top: 10px; left: 10px; width: 24px; height: 24px; padding: 3px; border-radius: 8px; background: #0009; }
.game-body { padding: 13px 15px 16px; } .game-body h3 { font-size: 15px; text-transform: capitalize; } .game-body p { margin-top: 3px; font: 10px var(--mono); }
.game-play { position: absolute; right: 12px; bottom: 12px; padding: 7px 12px; border: 0; border-radius: 99px; background: var(--cyan); color: #06101c; font-size: 11px; font-weight: 800; opacity: 0; transform: translateY(6px); transition: .25s var(--ease); }
.game-card:hover .game-play, .game-card:focus-visible .game-play { opacity: 1; transform: none; }
.game-remove { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border: 0; border-radius: 8px; background: #000a; color: #ffb4c1; opacity: 0; }
.game-card:hover .game-remove { opacity: 1; }

/* browser */
.browser-tab { border-radius: 11px 11px 0 0; transition: background .2s, border-color .2s; }
.tab-dot { flex: none; width: 8px; height: 8px; margin-left: 10px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.tab-select { padding-left: 7px; }
.browser-toolbar > button { border-radius: 50%; } .browser-toolbar > button:hover { background: #1b2a44; }
.address-form { height: 34px; border-radius: 99px; padding: 0 14px; }
#loadBar { position: absolute; z-index: 5; top: 0; left: 0; width: 100%; height: 2px; opacity: 0; background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent); transform: translateX(-100%); pointer-events: none; }
#loadBar.on { opacity: 1; animation: lb 1.1s linear infinite; } @keyframes lb { to { transform: translateX(100%); } }
.browser-x { border-radius: 50%; } .browser-x:hover { transform: rotate(90deg); }

/* ===================== AUTH: PLAYFUL TERMINAL ===================== */
@keyframes bootIn { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes scan { to { transform: translateY(640px); } }
@keyframes line { to { opacity: 1; } }
@keyframes g1 { 0%,90%,100% { clip-path: inset(0 0 100% 0); } 92% { clip-path: inset(10% 0 55% 0); transform: translate(-3px,0); } 95% { clip-path: inset(60% 0 8% 0); transform: translate(3px,0); } }
@keyframes g2 { 0%,88%,100% { clip-path: inset(100% 0 0 0); } 90% { clip-path: inset(40% 0 30% 0); transform: translate(3px,0); } 94% { clip-path: inset(5% 0 75% 0); transform: translate(-3px,0); } }
#authScreen { display: grid; place-items: center; grid-template-columns: 1fr; padding: 18px; overflow: auto; font-family: var(--mono);
  background: radial-gradient(ellipse at 50% 50%, rgba(3,6,14,.22), rgba(2,3,9,.84)); }
.term { position: relative; width: min(560px, 100%); overflow: hidden; border: 1px solid #8ce6ff55; border-radius: 16px; background: rgba(4,9,18,.9);
  box-shadow: 0 0 0 1px #000, 0 0 90px -24px var(--cyan), 0 40px 90px -30px #000; animation: bootIn .8s var(--ease); }
.term:before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 3px); }
.term:after { content: ""; position: absolute; z-index: 3; top: -90px; left: 0; right: 0; height: 90px; pointer-events: none; background: linear-gradient(transparent, rgba(140,230,255,.08), transparent); animation: scan 6s linear infinite; }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 11px 15px; border-bottom: 1px solid #8ce6ff30; background: #0a1626; color: #7ea3c4; font-size: 11px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff6b8a; } .term-bar i:nth-child(2) { background: #ffd36b; } .term-bar i:nth-child(3) { background: #6bffb0; }
.term-bar span { margin-left: 8px; } .term-bar em { margin-left: auto; font-style: normal; opacity: .6; }
.term-body { padding: 24px 28px 22px; }
.boot { margin-bottom: 14px; color: #5f8aa8; font-size: 11px; line-height: 1.8; }
.boot span { display: block; opacity: 0; animation: line .01s forwards; } .boot span:nth-child(1) { animation-delay: .3s; } .boot span:nth-child(2) { animation-delay: .9s; } .boot span:nth-child(3) { animation-delay: 1.5s; }
.boot b { color: var(--green); } .boot b.warn { color: #ffd36b; }
.glitch { position: relative; margin: 4px 0 6px; color: #fff; font: 800 clamp(40px, 10vw, 66px)/1 var(--mono); letter-spacing: -.05em; text-shadow: 0 0 34px var(--cyan); }
.glitch:before, .glitch:after { content: attr(data-t); position: absolute; inset: 0; }
.glitch:before { color: #ff4d9d; animation: g1 3.4s infinite steps(1); } .glitch:after { color: #3de6ff; animation: g2 3.4s infinite steps(1); }
.term .eyebrow { color: var(--green); font-size: 10px; letter-spacing: .16em; }
.term h2 { margin: 20px 0 6px; color: var(--cyan); font: 700 18px var(--mono); letter-spacing: -.01em; } .term h2:before { content: "$ "; color: var(--green); }
.term .auth-sub { margin: 0 0 18px; color: #86a3c2; font-size: 12px; line-height: 1.7; }
.term .auth-card label { color: #6fa6c4; font: 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; } .term .auth-card label:before { content: "> "; color: var(--green); }
.term .auth-card input { height: 46px; border: 1px solid #1d3a55; border-radius: 8px; background: #020711; color: #aef3ff; caret-color: var(--green); font: 15px var(--mono); }
.term .auth-card input::placeholder { color: #36566f; } .term .auth-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px #8cf0c218, 0 0 24px -8px var(--green); }
.term .primary { min-height: 48px; margin-top: 12px; border: 1px solid var(--green); border-radius: 8px; background: #0b1f1a; color: var(--green); font: 800 13px var(--mono); letter-spacing: .06em; box-shadow: inset 0 0 22px -10px var(--green), 0 0 26px -12px var(--green); }
.term .primary:hover { background: var(--green); color: #031009; filter: none; }
.term .auth-message { font-family: var(--mono); } .term .auth-switch { color: #6f8aa6; font-size: 11px; } .term .auth-switch button { color: var(--cyan); font: 700 11px var(--mono); }
.term .auth-status { border-radius: 8px; border-color: #1d3a55; background: #020711; font-size: 11px; }
.term .auth-note { margin-top: 16px; color: #4f6a85; font-size: 10px; }
.cursor { display: inline-block; width: 7px; height: 12px; margin-left: 4px; vertical-align: -2px; background: var(--green); animation: blink 1s steps(1) infinite; }
@media (max-width: 600px) { .term-body { padding: 20px 18px; } }


/* SCREEN MONITORING */
.mon-modal{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:20px;background:rgba(3,6,14,.96);backdrop-filter:blur(14px)}
.mon-box{width:min(460px,100%);padding:26px;border:1px solid var(--line);border-radius:14px;background:var(--panel)}
.mon-box h2{margin:0 0 12px;font-size:22px}
.mon-box p{margin:0 0 20px;color:var(--muted);font-size:13px;line-height:1.7;white-space:pre-line}
.mon-box input{width:100%;height:46px;margin:6px 0 14px;padding:0 13px;color:#f0f6ff;border:1px solid #2d3d59;border-radius:10px;background:#090f1e;outline:none;font:inherit}
.mon-box input:focus{border-color:var(--cyan);box-shadow:0 0 0 3px #8ce6ff12}
.mon-actions{display:flex;gap:10px;flex-wrap:wrap}
.mon-actions .primary{margin:0;flex:1}
.mon-ghost{min-height:45px;padding:0 15px;border:1px solid var(--line);border-radius:10px;color:var(--text);background:transparent}
.mon-admin{position:fixed;inset:0;z-index:350;display:flex;flex-direction:column;padding:16px;background:#050812}
.adm-head{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.adm-head h2{margin:0;font-size:20px}
.adm-sub{flex:1;min-width:0;color:var(--muted);font-size:12px}
.adm-body{flex:1;min-height:0;display:grid;grid-template-columns:minmax(310px,400px) 1fr;gap:12px}
.adm-users,.adm-view{min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.adm-tools{display:flex;gap:8px;padding:10px}
.adm-tools input,.adm-tools select{min-width:0;height:38px;padding:0 10px;color:var(--text);border:1px solid #2d3d59;border-radius:8px;background:#090f1e}
.adm-tools input{flex:1}
.adm-bulk{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;border-block:1px solid var(--line);font-size:12px}
.adm-check{display:flex;align-items:center;gap:8px;color:var(--muted)}
.adm-actions,.adm-rowbtns{display:flex;gap:6px}
.adm-btn{min-height:30px;padding:0 10px;border:1px solid var(--line);border-radius:8px;color:var(--text);background:transparent;font-size:12px;font-weight:700}
.adm-btn.ok{color:var(--green);border-color:#8cf0c255}
.adm-btn.bad{color:var(--danger);border-color:#ff9eae55}
.adm-btn:disabled{opacity:.4;cursor:not-allowed}
.adm-note{min-height:18px;padding:6px 10px;color:var(--muted);font-size:11px;overflow-wrap:anywhere}
.adm-list{flex:1;overflow:auto}
.adm-row{display:flex;align-items:center;gap:9px;padding:9px 10px;border-bottom:1px solid #1a2740;cursor:pointer}
.adm-row:hover{background:#111c30}
.adm-row.on{background:#16294a}
.adm-dot{flex:none;width:9px;height:9px;border-radius:50%;background:#44546f}
.adm-dot.live{background:var(--green);box-shadow:0 0 8px var(--green)}
.adm-info{flex:1;min-width:0}
.adm-info strong,.adm-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.adm-info small{color:var(--muted);font-size:11px}
.adm-badge{flex:none;padding:2px 7px;border-radius:99px;font-size:10px;font-weight:800;color:#ff9eae;background:#3a1220}
.adm-badge.ok{color:var(--green);background:#0f3022}
.term .auth-card label.anon-toggle{display:flex;align-items:center;gap:10px;margin:2px 0 4px;color:#aef3ff;font-size:12px;letter-spacing:0;text-transform:none;cursor:pointer}
.term .auth-card label.anon-toggle:before{content:none}
.term .auth-card .anon-toggle input{width:18px;height:18px;flex:none;margin:0;padding:0;accent-color:var(--green)}
.auth-hint{margin:0;color:#6f8aa6;font:11px var(--mono)}
#monQrBox{display:grid;justify-items:center;gap:8px;margin:0 0 10px}
#monQrBox img{width:180px;height:180px;padding:8px;border-radius:10px;background:#fff}
#monQrBox code{max-width:100%;overflow-wrap:anywhere;color:#aef3ff;font:12px var(--mono);user-select:all}
.adm-empty{padding:20px;color:var(--muted);font-size:13px;text-align:center}
.adm-viewbar{display:flex;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--line)}
.adm-viewbar span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font:12px "JetBrains Mono",monospace}
.adm-stage{position:relative;flex:1;min-height:0;background:#000}
#admFrames{position:absolute;inset:0}
#admFrames iframe{display:block;width:100%;height:100%;border:0;background:#fff}
.adm-viewmsg{position:absolute;inset:0;display:grid;place-content:center;gap:6px;padding:20px;text-align:center}
.adm-viewmsg h3{margin:0;font-size:18px}
.adm-viewmsg p{margin:0;color:var(--muted);font-size:13px;overflow-wrap:anywhere;white-space:pre-line}
@media(max-width:800px){.adm-body{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1fr)}}
.direct-game{position:fixed;inset:0;z-index:300;display:flex;flex-direction:column;background:#000}
.direct-game header{display:flex;align-items:center;gap:12px;padding:8px 300px 8px 12px;border-bottom:1px solid var(--line);background:var(--panel);font-size:13px}
.direct-game .tag{flex:1;color:var(--muted)}
.direct-game header a{color:var(--cyan)}
.direct-game iframe{flex:1;width:100%;border:0}
/* Horizon AI */
#aiPage:not(.hidden){display:grid;grid-template-columns:260px minmax(0,1fr);gap:16px;height:calc(100vh - 120px);height:calc(100dvh - 120px);min-height:420px}
.ai-side{display:flex;flex-direction:column;gap:10px;min-height:0;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.ai-side h2{margin:0;font-size:18px;letter-spacing:-.02em}
.ai-side h2 small{display:block;margin-top:2px;color:var(--muted);font-size:12px;font-weight:400;letter-spacing:0}
.ai-side button{width:100%;text-align:left}
.ai-share{display:flex;flex-direction:column;gap:8px;padding:10px;border:1px dashed var(--line);border-radius:12px}
.ai-share video{display:none;width:100%;aspect-ratio:16/10;object-fit:contain;border-radius:8px;background:#000}
.ai-share.on video{display:block}
.ai-share.on{border-style:solid;border-color:var(--green)}
.ai-share p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.ai-share label{display:flex;gap:8px;align-items:center;font-size:12px;color:var(--muted)}
.ai-live{display:none;align-items:center;gap:6px;font-size:12px;color:var(--green)}
.ai-live::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--green);animation:aiPulse 1.4s infinite}
.ai-share.on .ai-live{display:flex}
@keyframes aiPulse{50%{opacity:.3}}
.ai-main{display:flex;flex-direction:column;min-height:0;border:1px solid var(--line);border-radius:16px;background:var(--panel)}
.ai-log{flex:1;overflow-y:auto;padding:22px clamp(14px,4vw,48px);display:flex;flex-direction:column;gap:16px}
.ai-empty{margin:auto;text-align:center;color:var(--muted)}
.ai-empty h3{margin:0 0 6px;color:var(--text);font-size:clamp(22px,3vw,32px);font-weight:500}
.ai-msg{max-width:min(760px,100%);line-height:1.6;font-size:14px;overflow-wrap:anywhere}
.ai-msg.user{align-self:flex-end;padding:10px 14px;border-radius:16px 16px 4px 16px;background:var(--panel2);border:1px solid var(--line)}
.ai-msg.user img{display:block;max-width:220px;margin-bottom:8px;border-radius:8px;border:1px solid var(--line)}
.ai-msg.bot{align-self:flex-start}
.ai-msg.bot pre{overflow-x:auto;padding:10px 12px;border-radius:10px;background:#050912;border:1px solid var(--line)}
.ai-msg code{font-family:var(--mono,ui-monospace,monospace);font-size:13px}
.ai-msg :not(pre)>code{padding:1px 5px;border-radius:5px;background:var(--panel2)}
.ai-msg.err{color:var(--danger)}
.ai-msg.wait::after{content:"▍";animation:aiPulse 1s infinite}
.ai-form{display:flex;gap:8px;align-items:flex-end;margin:0 14px 14px;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--panel2)}
.ai-form textarea{flex:1;min-height:24px;max-height:160px;resize:none;padding:6px 8px;border:0;outline:0;background:transparent;color:var(--text);font:inherit;font-size:14px}
.ai-chip{display:none;align-items:center;gap:6px;padding:4px 8px;border-radius:999px;background:var(--panel);color:var(--green);font-size:12px;white-space:nowrap}
.ai-chip.on{display:inline-flex}
@media(max-width:760px){#aiPage:not(.hidden){grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);height:auto}.ai-main{min-height:60vh}}
.ai-bar{display:none}
/* AI page under a console theme: full screen in the theme's palette, like the themed Arcade */
body.console[data-page="aiPage"] :is(.topbar,.sidebar){display:none}
body.console[data-page="aiPage"] .app-frame{display:block}
body.console[data-page="aiPage"] .main{height:100vh;height:100dvh;padding:0 clamp(16px,4vw,56px) 20px;background:var(--t-bg);color:var(--t-fg)}
body.console #aiPage:not(.hidden){grid-template-rows:auto minmax(0,1fr);height:100%;min-height:0}
body.console #aiPage .ai-bar{grid-column:1/-1;display:flex;align-items:center;gap:14px;margin:0 calc(-1*clamp(16px,4vw,56px));padding:18px clamp(16px,4vw,56px) 14px;border-bottom:1px solid var(--t-line);background:var(--t-bar)}
.ai-bar button{width:40px;height:40px;border:1px solid var(--t-line);border-radius:50%;background:var(--t-input);color:var(--t-fg);font-size:22px;line-height:1;cursor:pointer}
.ai-bar button:hover,.ai-bar button:focus-visible{border-color:var(--t-accent);outline:0}
.ai-bar strong{font-size:24px;font-weight:500}
body.console #aiPage :is(.ai-side,.ai-main){border-color:var(--t-line);border-radius:var(--t-radius);background:var(--t-card);color:var(--t-fg);box-shadow:none}
body.console #aiPage :is(.ai-side h2 small,.ai-share p,.ai-share label,.ai-empty){color:var(--t-muted)}
body.console #aiPage .ai-empty h3,body.console #aiPage .ai-msg{color:var(--t-fg)}
body.console #aiPage .ai-share{border-color:var(--t-line);border-radius:var(--t-radius)}
body.console #aiPage .ai-share.on{border-color:var(--t-accent)}
body.console #aiPage :is(.ai-live,.ai-chip){color:var(--t-accent)} body.console #aiPage .ai-live::before{background:var(--t-accent)}
body.console #aiPage :is(.ai-form,.ai-msg.user,.ai-chip){border-color:var(--t-line);border-radius:var(--t-radius);background:var(--t-input)}
body.console #aiPage .ai-form textarea{color:var(--t-fg)} body.console #aiPage .ai-form textarea::placeholder{color:var(--t-muted)}
body.console #aiPage .primary-small{border:0;border-radius:var(--t-radius);background:var(--t-accent);color:var(--t-on);box-shadow:none}
body.console #aiPage .subtle-button{border-color:var(--t-line);border-radius:var(--t-radius);background:var(--t-input);color:var(--t-fg)}
body.console #aiPage :is(button,textarea):focus-visible{outline:2px solid var(--t-accent);outline-offset:2px}
body.console #aiPage .ai-msg :not(pre)>code{background:var(--t-input)}
/* a few theme touches */
body[data-iface="switch"] #aiPage :is(.ai-side,.ai-main){border:0}
body[data-iface="switch"] #aiPage .primary-small:hover{box-shadow:0 0 0 3px #2d2d2d,0 0 0 6px #00c3e3}
body:is([data-iface="ps3"],[data-iface="psp"]) #aiPage :is(.ai-side,.ai-main){backdrop-filter:blur(8px)}
body:is([data-iface="ps3"],[data-iface="psp"]) #aiPage .ai-msg.bot{text-shadow:0 1px 6px #0006}
body[data-iface="wii"] #aiPage :is(.ai-side,.ai-main){border:3px solid #fff;box-shadow:0 2px 10px #0002,inset 0 0 0 1px #c9ced4}
body[data-iface="wii"][data-page="aiPage"] .ai-bar{border-bottom:3px solid #35b5e9}
body[data-iface="steam"] #aiPage .primary-small{background:linear-gradient(#a4d007,#5c7e10);color:#fff}
body[data-iface="x360"] #aiPage :is(.ai-side,.ai-main){background:#fff}
body[data-iface="x360"] #aiPage .ai-bar strong{font-size:30px;font-weight:300;text-transform:lowercase}
body[data-iface="ds"] #aiPage .ai-main{border:6px solid #2b3038;background:repeating-linear-gradient(#fbfcfd 0 2px,#f0f3f6 2px 4px)}
body[data-iface="ps5"] #aiPage .primary-small{border-radius:99px}
body[data-iface="gb"] #aiPage,body[data-iface="gb"] #aiPage :is(button,textarea){font-family:var(--mono)}
body[data-iface="gb"] #aiPage :is(.ai-side,.ai-main){border:2px solid #0f380f}
body[data-iface="gb"] #aiPage .ai-bar strong{text-transform:uppercase;font-weight:800}
body[data-iface="gb"] #aiPage .ai-msg.bot pre{background:#0f380f;color:#9bbc0f}

/* Screenshare popout. Uses the theme palette when a console theme is on. */
.ai-dock{--d-bg:var(--t-card,var(--panel));--d-fg:var(--t-fg,var(--text));--d-muted:var(--t-muted,var(--muted));--d-line:var(--t-line,var(--line));--d-input:var(--t-input,var(--panel2));--d-accent:var(--t-accent,var(--cyan));--d-on:var(--t-on,#04121c);--d-radius:var(--t-radius,14px)}
body[data-iface="x360"] .ai-dock{--d-bg:#fff}
.ai-dock{position:fixed;left:16px;bottom:16px;z-index:2600;display:flex;flex-direction:column;width:min(340px,calc(100vw - 32px));max-height:min(520px,calc(100vh - 32px));border:1px solid var(--d-line);border-radius:var(--d-radius);background:var(--d-bg);color:var(--d-fg);box-shadow:0 18px 50px #0008;font-size:13px;overflow:hidden}
.ai-dock[hidden]{display:none}
.ai-dock header{display:flex;align-items:center;gap:8px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--d-line);cursor:default}
.ai-dock header strong{font-size:13px}
.ai-dock-tag{flex:1;color:var(--d-muted);font-size:11px}
.ai-dot{width:8px;height:8px;border-radius:50%;background:var(--d-accent);animation:aiPulse 1.4s infinite}
.ai-dock header button{width:28px;height:28px;border:1px solid var(--d-line);border-radius:8px;background:var(--d-input);color:var(--d-fg);font-size:14px;line-height:1;cursor:pointer}
.ai-dock header button:hover,.ai-dock header button:focus-visible{border-color:var(--d-accent);outline:0}
.ai-dock-body{display:flex;flex-direction:column;gap:8px;min-height:0;padding:10px}
.ai-dock.min .ai-dock-body{display:none}
.ai-dock video{width:100%;max-height:120px;object-fit:contain;border-radius:8px;background:#000}
.ai-dock-log{flex:1;min-height:60px;max-height:240px;overflow-y:auto;display:flex;flex-direction:column;gap:8px}
.ai-dock-hint{margin:0;color:var(--d-muted);line-height:1.5}
.ai-dock .ai-msg{font-size:13px;line-height:1.5;color:var(--d-fg)}
.ai-dock .ai-msg.user{padding:6px 10px;border:1px solid var(--d-line);border-radius:12px 12px 3px 12px;background:var(--d-input)}
.ai-dock .ai-msg.user img{display:none}
.ai-dock .ai-msg.bot pre{background:#050912;color:#e8eefc}
.ai-dock-quick{display:flex;gap:6px}
.ai-dock-quick button,.ai-dock-form button{padding:6px 10px;border:1px solid var(--d-line);border-radius:999px;background:var(--d-input);color:var(--d-fg);font:inherit;font-size:12px;cursor:pointer}
.ai-dock-quick button:hover{border-color:var(--d-accent)}
.ai-dock-form{display:flex;gap:6px;align-items:flex-end;padding:6px;border:1px solid var(--d-line);border-radius:12px;background:var(--d-input)}
.ai-dock-form textarea{flex:1;min-height:22px;max-height:110px;resize:none;border:0;outline:0;background:transparent;color:var(--d-fg);font:inherit;font-size:13px}
.ai-dock-form button{border:0;background:var(--d-accent);color:var(--d-on);font-weight:600}
.ai-dock-form button:disabled{opacity:.5}
body[data-iface="gb"] .ai-dock{font-family:var(--mono)}

/* Horizon AI: recent chats, model label, image attach, maths */
.ai-recent{display:flex;flex-direction:column;gap:6px;min-height:0;flex:1}
.ai-recent-head{color:var(--muted);font-size:11px;letter-spacing:.06em;text-transform:uppercase}
#aiRecent{display:flex;flex-direction:column;gap:2px;min-height:0;overflow-y:auto}
.ai-recent-empty{margin:4px 0;color:var(--muted);font-size:12px}
.ai-recent-row{display:flex;align-items:center;border-radius:8px}
.ai-recent-row:hover,.ai-recent-row.on{background:var(--panel2)}
.ai-recent-row button{flex:1;min-width:0;padding:6px 8px;border:0;background:none;color:inherit;font:inherit;font-size:12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.ai-recent-row button.x{flex:none;width:26px;padding:4px;color:var(--muted);text-align:center;opacity:0}
.ai-recent-row:hover button.x,.ai-recent-row button.x:focus-visible{opacity:1}
.ai-model{margin-top:6px;color:var(--muted);font-size:11px;letter-spacing:.02em}
.ai-had-img{color:var(--muted);font-size:12px}
.ai-attach{flex:none;width:30px;height:30px;border:1px solid var(--line);border-radius:50%;background:transparent;color:inherit;font-size:16px;line-height:1;cursor:pointer}
.ai-attach:hover,.ai-attach:focus-visible{border-color:var(--cyan);outline:0}
.ai-img-chip{position:relative;flex:none}
.ai-img-chip[hidden]{display:none}
.ai-img-chip img{display:block;width:40px;height:30px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.ai-img-chip button{position:absolute;top:-6px;right:-6px;width:16px;height:16px;padding:0;border:0;border-radius:50%;background:#000c;color:#fff;font-size:9px;line-height:16px;cursor:pointer}
.ai-msg .katex-display{margin:.4em 0;overflow-x:auto;overflow-y:hidden}
body.console #aiPage :is(.ai-recent-head,.ai-recent-empty,.ai-model,.ai-recent-row button.x){color:var(--t-muted)}
body.console #aiPage .ai-recent-row:is(:hover,.on){background:var(--t-input)}
body.console #aiPage .ai-attach{border-color:var(--t-line)}

/* Admin screen viewing: the user's banner and the admin's live view */

/* Above Horizon's full-screen browser (z-index 1500), so requests, the sharing bar and admin messages are always seen */

/* Chat with the administrator (user side) */
.u-chat{position:fixed;right:16px;bottom:16px;z-index:3050;display:flex;flex-direction:column;width:min(340px,calc(100vw - 32px));max-height:min(440px,calc(100vh - 80px));border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);box-shadow:0 18px 50px #000a;font-size:13px;overflow:hidden}
.u-chat[hidden]{display:none}
.u-chat header{display:flex;align-items:center;gap:8px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--line);background:var(--panel2)}
.u-chat header strong{flex:1}
.u-chat header button{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.u-chat-dot{width:8px;height:8px;border-radius:50%;background:var(--cyan)}
.u-chat.min .u-chat-log,.u-chat.min .u-chat-form{display:none}
/* A new message from the admin: the box pops open and flashes once (also in full screen and over games). */
.u-chat.pop{animation:uChatPop .9s var(--ease,ease)}
@keyframes uChatPop{0%{transform:translateY(14px) scale(.96);box-shadow:0 0 0 0 var(--cyan)}35%{transform:none;box-shadow:0 0 0 6px var(--cyan)}100%{box-shadow:0 18px 50px #000a}}
@media (prefers-reduced-motion:reduce){.u-chat.pop{animation:none}}
.u-chat.unread header{background:#1d4b6b}
.u-chat-log{flex:1;min-height:80px;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:10px}
.u-chat-log .m{max-width:85%;padding:7px 10px;border-radius:12px;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}
.u-chat-log .m.them{align-self:flex-start;background:var(--panel2);border:1px solid var(--line)}
.u-chat-log .m.me{align-self:flex-end;background:#16405f}
.u-chat-log .m.sys{align-self:center;max-width:100%;padding:2px 6px;color:var(--muted);font-size:11px}
.u-chat-form{display:flex;gap:6px;padding:8px;border-top:1px solid var(--line)}
.u-chat-form input{flex:1;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font:inherit}
.u-chat-form button{padding:8px 12px;border:0;border-radius:10px;background:var(--cyan);color:#04121c;font-weight:700;cursor:pointer}
/* Admin panel: controls and chat */
/* Delivery ticks on the admin's chat messages: ✓ sent / waiting, ✓✓ delivered to their Horizon. */
.adm-chat .m .tick{margin-left:6px;font-size:11px;opacity:.75;white-space:nowrap}
.adm-chat .m .tick.read{color:var(--cyan);opacity:1}
.adm-chat .m .tick.bad{color:#ff6b6b;opacity:1}
.adm-chat{position:absolute;top:10px;right:10px;bottom:10px;z-index:3;display:flex;flex-direction:column;width:min(320px,45%);border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 10px 30px #0009}
.adm-chat[hidden]{display:none}
.adm-chat header{display:flex;align-items:center;gap:8px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--line);font-size:13px}
.adm-chat header strong{flex:1}
.adm-chat-log{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:8px;padding:10px;font-size:13px}
.adm-chat-log .m{max-width:85%;padding:7px 10px;border-radius:12px;line-height:1.45;overflow-wrap:anywhere;white-space:pre-wrap}
.adm-chat-log .m.them{align-self:flex-start;background:var(--panel2);border:1px solid var(--line)}
.adm-chat-log .m.me{align-self:flex-end;background:#16405f}
.adm-chat-log .m.sys{align-self:center;color:var(--muted);font-size:11px}
.adm-chat form{display:flex;gap:6px;padding:8px;border-top:1px solid var(--line)}
.adm-chat input{flex:1;min-width:0;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--text);font:inherit}
.adm-unread{margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--cyan);color:#04121c;font-size:11px;font-weight:700}
/* Pages refresh once when the site's files change (see /api/version). */

/* Screen-share badge: small, in a corner, never moves the page (games aren't interrupted) */
/* Full screen: the game or page fills the screen; the game window's header is hidden (hold Esc to leave) */
#directGame:fullscreen header{display:none}
#directGame:fullscreen iframe,#browserViewport:fullscreen{width:100vw;height:100vh}
.fs-btn{white-space:nowrap}
/* Arcade: shelves, favourites star, hover tags, surprise button */
.game-shelves{display:flex;flex-direction:column;gap:18px;margin-bottom:20px}
.game-shelves:empty{display:none}
.game-shelf h2{margin:0 0 10px;font-size:16px;letter-spacing:-.01em}
.game-shelf-row{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 10px;scroll-snap-type:x proximity}
.game-shelf-row .game-card{flex:0 0 180px;scroll-snap-align:start}
.game-star{position:absolute;top:8px;right:8px;z-index:3;width:30px;height:30px;border:0;border-radius:50%;background:rgba(5,9,18,.65);color:#fff;font-size:16px;line-height:1;cursor:pointer;opacity:0;transition:opacity .15s}
.game-card:hover .game-star,.game-card:focus-within .game-star,.game-star.on{opacity:1}
.game-star.on{color:#ffd166}
.game-tags{margin:4px 0 0;color:var(--cyan);font-size:11px;max-height:0;overflow:hidden;opacity:0;transition:max-height .2s,opacity .2s}
.game-card:hover .game-tags,.game-card:focus-within .game-tags{max-height:30px;opacity:.9}
.game-surprise{margin-top:10px;padding:8px 14px;border:1px solid var(--line);border-radius:999px;background:var(--panel2);color:var(--text);font:inherit;font-size:13px;cursor:pointer}
.game-surprise:hover{border-color:var(--cyan)}
body.console #gamesPage .game-surprise{border-color:var(--t-line);background:var(--t-input);color:var(--t-fg);border-radius:var(--t-radius)}
body.console #gamesPage .game-shelf h2{color:var(--t-fg)}
/* Smooth page changes */
.page-in{animation:pageIn .22s cubic-bezier(.2,.7,.2,1)}
@keyframes pageIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.page-in{animation:none}}
/* Browser new-tab start page */
.nt-start{margin-top:22px;display:flex;flex-direction:column;gap:18px;width:min(640px,90vw)}
.nt-tiles,.nt-recent{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.nt-tile{display:flex;flex-direction:column;align-items:center;gap:8px;padding:14px 6px;border:1px solid var(--line);border-radius:14px;background:var(--panel2);color:var(--text);font:inherit;font-size:12px;cursor:pointer;transition:transform .15s,border-color .15s}
.nt-tile:hover,.nt-tile:focus-visible{transform:translateY(-2px);border-color:var(--cyan);outline:0}
.nt-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:var(--panel);font-size:17px;font-weight:700;color:var(--cyan)}
.nt-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nt-label{display:block;margin-bottom:8px;color:var(--muted);font-size:11px;letter-spacing:.06em;text-transform:uppercase;text-align:left}
body.console .nt-tile{border-color:var(--t-line);border-radius:var(--t-radius);background:var(--t-input);color:var(--t-fg)}
body.console .nt-ic{background:var(--t-card);color:var(--t-accent)}
/* AI starter questions and mic */
.ai-starters{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px;max-width:560px}
.ai-starters button{padding:8px 13px;border:1px solid var(--line);border-radius:999px;background:var(--panel2);color:var(--text);font:inherit;font-size:13px;cursor:pointer}
.ai-starters button:hover{border-color:var(--cyan)}
.ai-mic.on{border-color:#ff6b7d;background:#ff6b7d33;animation:aiPulse 1s infinite}
body.console #aiPage .ai-starters button{border-color:var(--t-line);border-radius:var(--t-radius);background:var(--t-input);color:var(--t-fg)}
.switch-row{display:flex;align-items:center;gap:8px;font-size:13px;cursor:pointer}
/* Browser bookmarks bar and tab preview card */
.bm-bar{display:flex;gap:4px;overflow-x:auto;padding:4px 10px;border-bottom:1px solid var(--line);background:var(--panel)}
.bm-bar[hidden]{display:none}
.bm{display:inline-flex;align-items:center;flex:none;border-radius:8px}
.bm:hover{background:var(--panel2)}
.bm button{border:0;background:none;color:var(--text);font:inherit;font-size:12px;cursor:pointer;padding:4px 6px;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bm .bm-x{padding:2px 6px;color:var(--muted);opacity:0}
.bm:hover .bm-x{opacity:1}
#bmToggle.on{color:#ffd166}
.tab-preview{position:fixed;z-index:1600;display:flex;align-items:center;gap:10px;width:290px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel);box-shadow:0 12px 30px #000a;pointer-events:none;animation:pageIn .15s ease}
.tab-preview[hidden]{display:none}
.tab-preview .tp-ic{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:9px;background:var(--panel2);color:var(--cyan);font-weight:700}
.tab-preview strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.tab-preview small{display:block;color:var(--muted);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
/* Title cards for games without cover art */
.game-art.titled .game-emoji{position:absolute;top:8px;left:10px;font-size:20px;filter:drop-shadow(0 2px 4px #0008)}
.game-art-title{position:relative;z-index:1;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;max-width:92%;padding:0 10px;color:#fff;font:800 19px/1.12 "Space Grotesk",system-ui,sans-serif;letter-spacing:-.01em;text-align:center;text-transform:uppercase;text-shadow:0 2px 0 #0006,0 6px 18px #000a;transition:transform .35s var(--ease)}
.game-card:hover .game-art-title{transform:scale(1.05)}
.game-art.titled .game-fav{position:absolute;right:8px;bottom:8px;width:22px;height:22px}

/* ===== APPEARANCE ===== */
/* Colour themes (Default interface; console interfaces keep their own palettes) */
body[data-look="sunset"]{--bg:#1a0b14;--panel:#26101c;--panel2:#331526;--line:#5a2a3e;--text:#fff1ea;--muted:#d6a8ae;--cyan:#ff9a5c;--violet:#ff5e8a;--green:#ffd166}
body[data-look="ocean"]{--bg:#04131c;--panel:#072130;--panel2:#0a2c40;--line:#174a63;--text:#e8fbff;--muted:#8fbccc;--cyan:#3fd5e0;--violet:#4f8cff;--green:#7ef0d0}
body[data-look="forest"]{--bg:#07130c;--panel:#0d1f14;--panel2:#132a1b;--line:#24472f;--text:#eefbea;--muted:#9fc2a3;--cyan:#7fe08a;--violet:#d4c96a;--green:#b6f07e}
body[data-look="sakura"]{--bg:#1b0f17;--panel:#261520;--panel2:#321b2a;--line:#5b3149;--text:#fff0f6;--muted:#d9a9c0;--cyan:#ff9ec9;--violet:#c9a6ff;--green:#ffd3e6}
body[data-look="cyberpunk"]{--bg:#0b0716;--panel:#140c24;--panel2:#1d1133;--line:#3d2266;--text:#f6f2ff;--muted:#a99ac7;--cyan:#f8ff3d;--violet:#ff2bd6;--green:#00f0ff}
body[data-look="mono"]{--bg:#0d0d0f;--panel:#151518;--panel2:#1d1d21;--line:#34343a;--text:#f2f2f2;--muted:#9a9aa2;--cyan:#e6e6e6;--violet:#b8b8c0;--green:#d0d0d0}
body[data-look="candy"]{--bg:#1c0d26;--panel:#28123a;--panel2:#33184a;--line:#5d2f80;--text:#fff4fb;--muted:#d6b3e3;--cyan:#ff5fa2;--violet:#7cf3e0;--green:#ffe066}
body[data-look="terminal"]{--bg:#000800;--panel:#001200;--panel2:#001a05;--line:#0c4a1a;--text:#b8ffc8;--muted:#4fbf6b;--cyan:#33ff66;--violet:#33ff66;--green:#7dff9a}
body[data-look="aurora"]{--bg:#061020;--panel:#0b1a30;--panel2:#10233d;--line:#1f3e60;--text:#eafcff;--muted:#9cc4d6;--cyan:#7cf3c8;--violet:#a58bff;--green:#7cf3c8}
body[data-look="terminal"] .home-title,body[data-look="terminal"] h1,body[data-look="terminal"] h2{text-shadow:0 0 12px #33ff6688}
body[data-look="terminal"]::after{content:"";position:fixed;inset:0;z-index:2999;pointer-events:none;background:repeating-linear-gradient(#0000 0 2px,#00000022 2px 3px)}
body:not(.console) .page-head h1{background:linear-gradient(100deg,var(--text),var(--cyan))!important;-webkit-background-clip:text!important;background-clip:text!important;color:transparent!important}

/* Theme picker swatches */
.look-swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin:6px 0 14px}
.look-swatch{display:flex;align-items:center;gap:10px;padding:10px;border:2px solid transparent;border-radius:12px;background:var(--sw-bg);color:#fff;font:inherit;font-size:12px;cursor:pointer;box-shadow:inset 0 0 0 1px #ffffff1a}
.look-swatch .sw-dot{flex:none;width:18px;height:18px;border-radius:50%;background:var(--sw-ac);box-shadow:0 0 12px var(--sw-ac)}
.look-swatch[aria-checked="true"]{border-color:var(--sw-ac)}
.look-swatch:hover{transform:translateY(-1px)}

/* Fonts */
body[data-font="grotesk"]{font-family:"Space Grotesk",system-ui,sans-serif}
body[data-font="mono"]{font-family:var(--mono)}
body[data-font="rounded"]{font-family:ui-rounded,"SF Pro Rounded","Varela Round","Nunito",system-ui,sans-serif}
body[data-font="serif"]{font-family:"Iowan Old Style","Palatino Linotype",Georgia,serif}
body:is([data-font="mono"],[data-font="rounded"],[data-font="serif"]) :is(button,input,select,textarea){font-family:inherit}

/* Corners */
body[data-corners="sharp"]:not(.console) :is(.panel-card,.game-card,.link-button,.primary,.primary-small,.subtle-button,.secondary-small,.game-filter,.home-search,.ai-side,.ai-main,.ai-form,.nt-tile,.game-chip,.game-surprise,.look-swatch,.toast){border-radius:2px!important}
body[data-corners="soft"]:not(.console) :is(.panel-card,.game-card,.ai-side,.ai-main,.nt-tile){border-radius:8px!important}

/* Compact mode */
body.look-compact .game-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;gap:10px!important}
body.look-compact .game-art{height:86px}
body.look-compact .game-body{padding:8px 10px!important}
body.look-compact .game-body h3{font-size:13px}
body.look-compact .game-body p{font-size:11px}
body.look-compact .main{padding-top:14px}
body.look-compact .panel-card{padding:14px!important}

/* Glass panels */
body.look-glass:not(.console) :is(.panel-card,.game-card,.ai-side,.ai-main,.sidebar,.topbar,.home-search){background:color-mix(in srgb,var(--panel) 55%,transparent)!important;backdrop-filter:blur(16px) saturate(1.3);border-color:color-mix(in srgb,var(--text) 14%,transparent)!important}

/* Card tilt + spotlight */
/* 3D tilt: the tilting tiles' parents give the depth; the rotation itself is set from app.js */
body.look-tilt :is(.game-list,.game-shelf-row,.g-grid,#wiiGrid,#xbGrid,#dsGrid,#p5Row,#stList,#gbList,#chTiles,.hcont-row,.nt-tiles,.nt-recent,.xmb-items){perspective:900px}
body.look-tilt :is(.game-card,.g-tile,.ch-tile,.hcont,.nt-tile,.xmb-item){transition:rotate .12s ease-out,transform .3s var(--ease),box-shadow .3s,border-color .2s,background .2s}
body.look-spot .game-card::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:0;transition:opacity .25s;background:radial-gradient(240px circle at var(--mx,50%) var(--my,50%),color-mix(in srgb,var(--cyan) 22%,transparent),transparent 60%)}
body.look-spot .game-card:hover::after{opacity:1}

/* Home clock */
.home-clock{display:flex;flex-direction:column;align-items:center;gap:2px;margin-bottom:14px}
.home-clock[hidden]{display:none}
.hc-time{font:700 clamp(46px,8vw,86px)/1 "Space Grotesk",system-ui,sans-serif;letter-spacing:-.04em;background:linear-gradient(180deg,var(--text),color-mix(in srgb,var(--cyan) 70%,var(--text)));-webkit-background-clip:text;background-clip:text;color:transparent;font-variant-numeric:tabular-nums}
.hc-date{color:var(--muted);font-size:14px}
body[data-font="mono"] .hc-time{font-family:var(--mono)}

/* Continue playing (home) */
.home-continue{width:min(760px,92%);margin:22px auto 0}
.home-continue[hidden]{display:none}
.hcont-label{display:block;margin-bottom:8px;color:var(--muted);font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.hcont-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}
.hcont{flex:0 0 132px;display:flex;flex-direction:column;gap:6px;padding:0;border:1px solid var(--line);border-radius:14px;background:var(--panel);color:var(--text);font:inherit;font-size:12px;overflow:hidden;cursor:pointer;transition:transform .15s,border-color .15s}
.hcont:hover{transform:translateY(-3px);border-color:var(--cyan)}
.hcont-art{display:block;height:74px;background-size:cover;background-position:center}
.hcont-name{padding:0 8px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}

/* Themed scrollbars */
*{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--cyan) 45%,transparent) transparent}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{border:3px solid transparent;border-radius:99px;background:color-mix(in srgb,var(--cyan) 45%,transparent) padding-box}
::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--cyan) 70%,transparent) padding-box}
::-webkit-scrollbar-track{background:transparent}

/* Toasts with icons */
.toast{display:flex;align-items:center;gap:10px}
.toast-ic{display:grid;place-items:center;flex:none;width:22px;height:22px;border-radius:50%;background:color-mix(in srgb,var(--cyan) 22%,transparent);color:var(--cyan);font-size:12px;font-weight:800}
.toast[data-kind="warn"] .toast-ic{background:#ff9eae33;color:#ff9eae}
.toast[data-kind="ok"] .toast-ic{background:#8cf0c233;color:#8cf0c2}

/* ===== MORE INTERFACES: palettes (used by the Arcade, AI and Settings pages) ===== */
body[data-iface="ps4"]{--t-bg:linear-gradient(160deg,#0b3c8f,#062156 55%,#020c24);--t-bar:#041437;--t-fg:#fff;--t-muted:#b9cbec;--t-accent:#3d8bff;--t-on:#fff;--t-card:#0e2c66;--t-line:#2a4c8f;--t-input:#08204c;--t-radius:4px}
body[data-iface="deck"]{--t-bg:#1b2838;--t-bar:#0e141b;--t-fg:#e6edf3;--t-muted:#8ea2b5;--t-accent:#1a9fff;--t-on:#fff;--t-card:#23313f;--t-line:#34485c;--t-input:#151f2a;--t-radius:8px}
body[data-iface="ps2"]{--t-bg:radial-gradient(120% 80% at 50% 60%,#16285a,#050b1f 70%);--t-bar:#030712;--t-fg:#dfe8ff;--t-muted:#8ea0cc;--t-accent:#8fb6ff;--t-on:#030712;--t-card:#ffffff10;--t-line:#ffffff26;--t-input:#00000055;--t-radius:2px}
body[data-iface="vita"]{--t-bg:linear-gradient(165deg,#0aa0e6,#0567b8 50%,#03336b);--t-bar:#02294f;--t-fg:#fff;--t-muted:#d0ecff;--t-accent:#fff;--t-on:#035a9f;--t-card:#ffffff1c;--t-line:#ffffff40;--t-input:#00000033;--t-radius:22px}
body[data-iface="xone"]{--t-bg:radial-gradient(circle at 20% 0,#0f3d1a,#0b0f0c 60%);--t-bar:#0b0f0c;--t-fg:#fff;--t-muted:#9fb3a3;--t-accent:#4cbb3f;--t-on:#fff;--t-card:#1d2a1f;--t-line:#2f4532;--t-input:#141c15;--t-radius:0px}
body[data-iface="dreamcast"]{--t-bg:radial-gradient(circle at 50% 30%,#fff,#e9e3dc);--t-bar:#f4efe9;--t-fg:#2a2a2a;--t-muted:#7a7068;--t-accent:#f26722;--t-on:#fff;--t-card:#f26722;--t-line:#d7cfc6;--t-input:#fff;--t-radius:6px}
body[data-iface="gamecube"]{--t-bg:#2b1d4f;--t-bar:#21163d;--t-fg:#f1ecff;--t-muted:#b8a9e0;--t-accent:#9b7bff;--t-on:#fff;--t-card:#3a2868;--t-line:#5a43a0;--t-input:#2a1c50;--t-radius:6px}
body[data-iface="n64"]{--t-bg:#141414;--t-bar:#0d0d0d;--t-fg:#fff;--t-muted:#bdbdbd;--t-accent:#e4322b;--t-on:#fff;--t-card:#232323;--t-line:#3a3a3a;--t-input:#1b1b1b;--t-radius:4px}
body[data-iface="wiiu"]{--t-bg:linear-gradient(#f5f7f9,#dde2e7);--t-bar:#fff;--t-fg:#4a4f57;--t-muted:#7d8590;--t-accent:#14b4e6;--t-on:#fff;--t-card:#fff;--t-line:#cfd5dc;--t-input:#f0f3f6;--t-radius:22px}
body[data-iface="n3ds"]{--t-bg:linear-gradient(#2f3640,#14181d);--t-bar:#1c2128;--t-fg:#eef2f6;--t-muted:#9aa5b1;--t-accent:#e4322b;--t-on:#fff;--t-card:#2a3038;--t-line:#47515c;--t-input:#20262d;--t-radius:12px}
body[data-iface="gba"]{--t-bg:#1d1838;--t-bar:#2a2350;--t-fg:#efeaff;--t-muted:#b4aad8;--t-accent:#8f7cff;--t-on:#fff;--t-card:#2a2350;--t-line:#4a3f86;--t-input:#231d44;--t-radius:10px}
body[data-iface="epic"]{--t-bg:#121212;--t-bar:#18181b;--t-fg:#f5f5f5;--t-muted:#a1a1aa;--t-accent:#0078f2;--t-on:#fff;--t-card:#202024;--t-line:#2f2f35;--t-input:#1a1a1d;--t-radius:10px}

/* Picker previews for the new interfaces */
.iface-prev.sk-ps4{background:linear-gradient(160deg,#1f62c9,#031034)!important}
.iface-prev.sk-deck{background:linear-gradient(160deg,#2a475e,#0e141b)!important}
.iface-prev.sk-ps2{background:radial-gradient(circle at 50% 60%,#16285a,#050b1f)!important}
.iface-prev.sk-vita{background:linear-gradient(165deg,#0aa0e6,#03336b)!important}
.iface-prev.sk-xone{background:linear-gradient(180deg,#0f3d1a,#0b0f0c)!important}
.iface-prev.sk-dreamcast{background:radial-gradient(circle,#fff,#e9e3dc)!important}
.iface-prev.sk-dreamcast i{background:#f26722!important}
.iface-prev.sk-gamecube{background:radial-gradient(circle at 50% 20%,#4a338a,#21163d)!important}
.iface-prev.sk-n64{background:linear-gradient(135deg,#1a1a1a,#0a0a0a)!important}
.iface-prev.sk-n64 i:nth-child(odd){background:#e4322b!important}
.iface-prev.sk-wiiu{background:linear-gradient(#3b4149,#23272c)!important}
.iface-prev.sk-n3ds{background:radial-gradient(circle,#3a1416,#120607)!important}
.iface-prev.sk-gba{background:radial-gradient(circle,#6a55c9,#2a2350)!important}
.iface-prev.sk-epic{background:#121212!important}
.iface-prev.sk-epic i{background:#0078f2!important}

/* ===== CUSTOM CONSOLE HOMES (each interface below draws its own home into #customHome) ===== */
body.custom-iface .v-custom{display:flex!important}
body.custom-iface .console-home>:is(.ch-top,.ch-foot){display:none!important}
.v-custom{position:absolute;inset:0;overflow:hidden;z-index:1}
:where(.v-custom button){font:inherit;color:inherit;background-color:transparent;border:0;padding:0;margin:0;cursor:pointer;text-align:inherit}
.v-custom button:focus-visible{outline:none}
.v-custom [style*="background-image"]{background-size:cover;background-position:center;background-repeat:no-repeat}
.v-custom [data-nav]{transition:transform .18s ease,box-shadow .18s ease,background-color .18s ease,color .18s ease,width .2s ease,height .2s ease}
body.look-tilt :is(.sd-row,.p4-row,.wu-grid,.n3-grid,.ep-grid,.x1-grid,.n6-shelf,.pv-page,.dc-grid,.gc-list,.p2-cards){perspective:900px}

/* GameCube */
.cx-gamecube{background:radial-gradient(ellipse at 30% 30%,#6a4bc4,#2d1a63 55%,#120a2a);color:#efe9ff;font-family:"Trebuchet MS",Arial,sans-serif}
.gc-bg{position:absolute;inset:0;background:repeating-linear-gradient(0deg,#ffffff07 0 1px,transparent 1px 40px),repeating-linear-gradient(90deg,#ffffff07 0 1px,transparent 1px 40px);mask:radial-gradient(circle at 30% 30%,#000,transparent 75%)}
.gc-stage{position:absolute;left:9%;top:9%;width:150px;height:150px;perspective:700px;display:grid;place-items:center}
.gc-cube{position:relative;width:96px;height:96px;transform-style:preserve-3d;animation:gcspin 9s linear infinite}
.gc-cube i{position:absolute;inset:0;background:linear-gradient(135deg,#8d6cf0,#4b2f9e);border:3px solid #c4b1ff;border-radius:6px;box-shadow:inset 0 0 18px #0006}
.gc-cube i::after{content:"";position:absolute;inset:26%;border:6px solid #e4dbff;border-right-color:transparent;border-radius:4px;opacity:.75}
.gc-cube .front{transform:translateZ(48px)}.gc-cube .back{transform:rotateY(180deg) translateZ(48px)}
.gc-cube .right{transform:rotateY(90deg) translateZ(48px)}.gc-cube .left{transform:rotateY(-90deg) translateZ(48px)}
.gc-cube .top{transform:rotateX(90deg) translateZ(48px)}.gc-cube .bottom{transform:rotateX(-90deg) translateZ(48px)}
@keyframes gcspin{from{transform:rotateX(-24deg) rotateY(0)}to{transform:rotateX(-24deg) rotateY(360deg)}}
.gc-menu{position:absolute;left:6%;top:40%;display:flex;flex-direction:column;gap:8px}
.gc-opt{display:flex;align-items:center;gap:14px;padding:9px 26px 9px 10px;border-radius:30px;font-weight:700;font-size:21px;letter-spacing:.04em;color:#c3b3ff}
.gc-opt.on{background:linear-gradient(90deg,#a184ff,#6545d4);color:#fff;box-shadow:0 0 24px #9b7bffaa;transform:translateX(10px)}
.gc-ic{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#ffffff1f;font-size:14px}
.gc-panel{position:absolute;right:5%;top:8%;bottom:10%;width:min(54%,680px);background:#1a0f3acc;border:2px solid #7d5cd6;border-radius:20px;padding:22px;display:flex;flex-direction:column;backdrop-filter:blur(6px);box-shadow:0 0 40px #0008}
.gc-panel h2{margin:0 0 14px;font-size:18px;color:#d9ccff;letter-spacing:.12em;text-transform:uppercase}
.gc-hint{justify-content:center;align-items:center;text-align:center}.gc-hint p{color:#b8a9e0}
.gc-list{overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:10px;padding:4px;align-content:start;scrollbar-width:thin}
.gc-game{display:flex;align-items:center;gap:12px;padding:8px;border-radius:12px;background:#ffffff0d;text-align:left;font-weight:700;font-size:14px}
.gc-game.on{background:#9b7bff;color:#fff;box-shadow:0 0 0 2px #fff,0 0 18px #9b7bff}
.gc-thumb{width:54px;height:54px;border-radius:8px;flex:none;background-color:#3a2868}
.gc-clock{position:absolute;left:6%;bottom:6%;font-weight:700;font-size:18px;color:#b9a2ff}

/* Steam Deck */
.cx-deck{background:#0e141b;color:#fff;font-family:"Motiva Sans",Arial,sans-serif}
.sd-hero{position:absolute;inset:-20px;background-color:#1b2838;filter:blur(3px) brightness(.55)}
.sd-shade{position:absolute;inset:0;background:linear-gradient(90deg,#0e141bf0 0,#0e141b80 45%,transparent 75%),linear-gradient(0deg,#0e141b 10%,transparent 65%)}
.sd-top{position:absolute;top:0;left:0;right:0;height:44px;display:flex;align-items:center;gap:18px;padding:0 22px;font-size:14px;color:#dfe3e8;background:#0e141bb0;z-index:2}
.sd-logo{font-weight:800;letter-spacing:.12em}.sd-spacer{flex:1}.sd-clock{font-weight:700}
.sd-menu{position:absolute;left:0;top:44px;bottom:40px;width:66px;display:flex;flex-direction:column;align-items:center;gap:6px;padding-top:16px;background:#0b1016d0;border-right:1px solid #ffffff14;z-index:2}
.sd-mi{width:46px;height:46px;border-radius:8px;font-size:20px;color:#c6d4df;display:grid;place-items:center}
.sd-mi.on{background:#1a9fff;color:#fff}
.sd-main{position:absolute;left:90px;right:0;top:44px;bottom:40px;display:flex;flex-direction:column;padding-bottom:18px}
.sd-info{margin-bottom:auto;padding-top:9vh;max-width:60%}
.sd-title{font-weight:800;font-size:clamp(28px,4vw,50px);line-height:1.05;text-shadow:0 2px 14px #000}
.sd-sub{color:#b8c4cf;margin-top:8px;font-size:15px}
.sd-h{font-weight:700;font-size:15px;color:#dfe3e8;margin:0 0 4px 4px}
.sd-row{display:flex;gap:14px;overflow-x:auto;padding:22px 30px 14px 6px;scrollbar-width:none;align-items:flex-end}
.sd-cap{flex:none;width:clamp(110px,11vw,160px);aspect-ratio:2/3;border-radius:6px;background-color:#23313f;position:relative;box-shadow:0 6px 18px #000a;display:flex;align-items:flex-end;overflow:hidden}
.sd-cap span{width:100%;padding:24px 8px 8px;font-size:12px;font-weight:700;background:linear-gradient(transparent,#000d);opacity:0;transition:opacity .2s}
.sd-cap.on{transform:scale(1.1) translateY(-6px);box-shadow:0 0 0 3px #fff,0 14px 34px #000}
.sd-cap.on span{opacity:1}
.sd-lib{display:grid;place-items:center;align-items:center;background:#23313f}.sd-lib span{opacity:1;background:none;padding:0;font-size:15px;text-align:center}
.sd-foot{position:absolute;bottom:0;left:0;right:0;height:40px;display:flex;justify-content:flex-end;align-items:center;gap:24px;padding:0 24px;background:#0b1016;font-size:13px;color:#c6d4df;z-index:2}

/* PS2 */
.cx-ps2{background:radial-gradient(ellipse at 50% 85%,#0b1638,#000 65%);color:#cfe0ff;font-family:Arial,sans-serif}
.p2-towers{position:absolute;left:0;right:0;bottom:0;height:75%;pointer-events:none;z-index:0;isolation:isolate}
.p2-towers i{position:absolute;bottom:8%;height:var(--h);background:linear-gradient(to top,#1d3cff00,#3f74ff66 30%,#9ec0ff 92%,#dbe8ff);border-radius:2px;filter:blur(var(--b));box-shadow:0 0 30px #3b6bff66;opacity:var(--o);animation:p2glow 6s ease-in-out var(--d) infinite}
.p2-towers::after{content:"";position:absolute;inset:0;z-index:20;background:linear-gradient(to top,#000 0,#000a 12%,transparent 45%,transparent 70%,#000),radial-gradient(ellipse at 50% 90%,#1b3a9a44,transparent 60%)}
@keyframes p2glow{0%,100%{filter:blur(var(--b)) brightness(.6)}50%{filter:blur(var(--b)) brightness(1.25)}}
.p2-menu{position:absolute;left:50%;top:46%;transform:translate(-50%,-50%);display:flex;flex-direction:column;gap:34px;align-items:center;z-index:1}
.p2-opt{font-size:30px;letter-spacing:.14em;color:#7d93c6;padding:8px 34px;text-shadow:0 0 8px #3b6bff;white-space:nowrap}
.p2-opt.on{color:#fff;text-shadow:0 0 12px #9fc0ff,0 0 34px #3b6bff;transform:scale(1.06)}
.p2-sys{gap:12px}.p2-sys .p2-opt{font-size:22px}
.p2-path{font-size:13px;letter-spacing:.24em;color:#6f88c0;text-transform:uppercase;margin-bottom:8px}
.p2-browser{position:absolute;inset:6% 6% 6%;display:flex;flex-direction:column;gap:14px;z-index:1}
.p2-cards{flex:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:26px 18px;overflow:auto;padding:14px;align-content:start;scrollbar-width:none}
.p2-save{display:flex;flex-direction:column;align-items:center;gap:10px;color:#8fa3cf;font-size:13px}
.p2-icon{width:92px;height:92px;border-radius:6px;background-color:#16285a;transform:perspective(300px) rotateY(-20deg);box-shadow:0 0 0 1px #4f86ff55,0 8px 16px #000}
.p2-save.on{color:#fff}.p2-save.on .p2-icon{animation:p2spin 3s linear infinite;box-shadow:0 0 0 2px #9fc0ff,0 0 26px #4f86ff}
@keyframes p2spin{from{transform:perspective(300px) rotateY(0)}to{transform:perspective(300px) rotateY(360deg)}}
.p2-name{max-width:130px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.p2-foot{color:#6f88c0;font-size:13px;letter-spacing:.1em;text-align:right}
.p2-clock{position:absolute;right:5%;bottom:5%;color:#6f88c0;font-size:15px;letter-spacing:.1em}

/* PS4 */
.cx-ps4{background:radial-gradient(120% 90% at 70% 10%,#2a6fd6,#0b3c8f 35%,#031034 80%);color:#fff;font-family:Arial,sans-serif}
.p4-waves{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.p4-waves i{position:absolute;left:-30%;right:-30%;height:70%;top:42%;border-radius:50%;border-top:2px solid #ffffff26;animation:p4drift 14s ease-in-out infinite alternate}
.p4-waves i:nth-child(2){top:50%;border-top-color:#ffffff18;animation-duration:18s;animation-delay:-4s}
.p4-waves i:nth-child(3){top:58%;border-top-color:#9fc4ff22;animation-duration:22s;animation-delay:-9s}
@keyframes p4drift{from{transform:translateX(-6%) rotate(-2deg)}to{transform:translateX(6%) rotate(2deg)}}
.p4-fn{position:absolute;top:6%;left:0;right:0;display:flex;justify-content:center;gap:20px;align-items:center}
.p4-f{width:44px;height:44px;border-radius:50%;font-size:18px;color:#dce8ff;background:#ffffff14;display:grid;place-items:center}
.p4-f.on{background:#fff;color:#0b3c8f;transform:scale(1.15)}
.p4-spacer{display:none}.p4-clock{position:absolute;right:4%;font-size:16px}
.p4-row{position:absolute;top:27%;left:0;right:0;height:250px;display:flex;gap:10px;align-items:flex-start;padding:10px 6%;overflow-x:auto;scrollbar-width:none}
.p4-tile{flex:none;width:128px;height:128px;border-radius:2px;background-color:#0e2c66;box-shadow:0 4px 14px #0006}
.p4-tile.on{width:216px;height:216px;box-shadow:0 0 0 3px #fff,0 0 34px #5aa0ff}
.p4-lib{display:grid;place-items:center;background:#ffffff1a;font-size:40px}
.p4-text{position:absolute;top:calc(27% + 250px);left:6%}
.p4-label{font-size:28px;font-weight:300}.p4-info{color:#b9cbec;font-size:14px;margin-top:4px}

/* PS Vita */
.cx-vita{background:linear-gradient(165deg,#28bdf5,#0670c4 50%,#033a78);color:#fff;font-family:Arial,sans-serif}
.pv-status{position:absolute;top:0;left:0;right:0;height:34px;display:flex;align-items:center;gap:12px;padding:0 18px;background:#0006;font-size:13px}
.pv-spacer{flex:1}
.pv-page{position:absolute;top:56px;left:5%;right:5%;bottom:20px;display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:18px 10px;align-content:start;justify-items:center;overflow:auto;padding:10px 0 40px;scrollbar-width:none}
.pv-b{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px}
.pv-b:nth-child(2n){transform:translateY(28px)}
.pv-bub{width:88px;height:88px;border-radius:50%;background-color:#ffffff38;display:grid;place-items:center;font-size:32px;box-shadow:0 4px 10px #0005,inset 0 0 0 3px #fff8,inset 0 10px 14px #fff4;transition:transform .2s,box-shadow .2s}
.pv-b.on .pv-bub{transform:scale(1.14);box-shadow:0 0 0 4px #fff,0 0 26px #fffa}
.pv-name{max-width:110px;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:0 1px 3px #0008}
.pv-live{position:absolute;inset:4%;border-radius:20px;overflow:hidden;background:#0a2a52;box-shadow:0 10px 40px #0008}
.pv-banner{position:absolute;inset:0;background-color:#0b3a70}
.pv-banner::after{content:"";position:absolute;inset:0;background:linear-gradient(0deg,#000a,transparent 50%)}
.pv-gate{position:absolute;left:28px;bottom:28px;display:flex;align-items:center;gap:18px;font-size:28px;text-shadow:0 2px 8px #000;z-index:1}
.pv-gate .pv-bub{width:72px;height:72px}
.pv-start{position:absolute;right:6%;bottom:10%;padding:20px 70px;border-radius:40px;background:#fff!important;color:#0670c4!important;font-weight:700!important;font-size:26px!important;box-shadow:0 6px 18px #0006;z-index:1}
.pv-start.on{box-shadow:0 0 0 4px #9fdcff,0 0 30px #fff}
.pv-close{position:absolute;left:20px;top:16px;padding:8px 18px;border-radius:20px;background:#0007!important;z-index:1}
.pv-close.on{background:#fff!important;color:#0670c4!important}

/* Xbox One */
.cx-xone{background:radial-gradient(circle at 15% 0,#1d3d22,#0d120e 60%);color:#fff;font-family:"Segoe UI",Arial,sans-serif}
.x1-tabs{position:absolute;top:5%;left:5%;right:4%;display:flex;gap:34px;align-items:baseline;font-weight:300;font-size:26px;color:#7f9683}
.x1-tabs b{color:#fff;font-weight:400}.x1-spacer{flex:1}.x1-tabs .js-clock{font-size:18px;color:#cfe0d1}
.x1-body{position:absolute;top:16%;left:5%;right:3%;bottom:6%;display:flex;gap:14px}
.x1-pins{display:flex;flex-direction:column;gap:6px;width:200px;flex:none}
.x1-pin{display:flex;gap:12px;align-items:center;padding:12px;background:#ffffff12;text-align:left;font-size:15px}
.x1-pin.on{background:#107c10;box-shadow:inset 0 0 0 2px #fff}
.x1-grid{flex:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));grid-auto-flow:dense;gap:8px}
.x1-t{background-color:#24332a;position:relative;display:flex;align-items:flex-end;padding:8px;font-size:13px;text-align:left;min-height:0;overflow:hidden}
.x1-t span{text-shadow:0 1px 4px #000;position:relative}
.x1-big{grid-column:span 2;grid-row:span 2;font-size:20px;padding:14px}
.x1-app{background:#107c10;flex-direction:column;align-items:flex-start;justify-content:space-between}.x1-app b{font-size:26px;font-weight:400}
.x1-t.on{box-shadow:inset 0 0 0 3px #fff;transform:scale(1.03);z-index:1}

/* Dreamcast */
.cx-dreamcast{background:radial-gradient(circle at 50% 45%,#fff,#ede7e0 65%,#d6cdc2);color:#3a3a3a;font-family:Arial,sans-serif}
.dc-swirl{position:absolute;left:50%;top:50%;width:min(80vh,680px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:50%;background:repeating-radial-gradient(circle at 46% 54%,#f26722 0 12px,transparent 12px 30px);opacity:.16;-webkit-mask:conic-gradient(#000,transparent 85%);mask:conic-gradient(#000,transparent 85%);animation:dcspin 40s linear infinite}
.dc-swirl.small{width:240px;left:auto;top:auto;right:4%;bottom:4%;transform:none;animation:none}
@keyframes dcspin{to{transform:translate(-50%,-50%) rotate(360deg)}}
.dc-grid{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);display:grid;grid-template-columns:repeat(2,min(210px,38vw));gap:24px}
.dc-big{height:150px;border-radius:14px;background:linear-gradient(#fff,#ebe6e0)!important;border:2px solid #d3c9be!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font-weight:700;font-size:22px;color:#555;box-shadow:0 6px 16px #0002}
.dc-ic{width:58px;height:58px;border-radius:50%;background:#f26722;color:#fff;display:grid;place-items:center;font-size:26px}
.dc-big.on{border-color:#f26722!important;box-shadow:0 0 0 4px #f2672255,0 10px 24px #f2672244;color:#f26722;transform:scale(1.05)}
.dc-extra{position:absolute;left:50%;bottom:7%;transform:translateX(-50%);display:flex;gap:12px}
.dc-small{padding:8px 20px;border-radius:20px;border:1px solid #cfc5ba!important;background:#fff!important;font-size:14px}
.dc-small.on{background:#f26722!important;color:#fff;border-color:#f26722!important}
.dc-clock{position:absolute;right:4%;top:4%;font-size:18px;color:#f26722;font-weight:700}
.dc-list{position:absolute;inset:6% 32% 6% 6%;display:flex;flex-direction:column;gap:6px;overflow:auto;scrollbar-width:thin}
.dc-list h2{color:#f26722;margin:0 0 10px}
.dc-row{display:flex;align-items:center;gap:12px;padding:8px 12px;border-radius:10px;background:#fff!important;border:1px solid #e0d8cf!important;text-align:left;font-weight:700;flex:none}
.dc-row.on{background:#f26722!important;color:#fff;border-color:#f26722!important}
.dc-vmu{width:52px;height:38px;border-radius:4px;background-color:#9bbc0f;flex:none;image-rendering:pixelated}

/* Nintendo 64 */
.cx-n64{background:radial-gradient(circle at 50% 30%,#2b2b30,#0b0b0d 70%);color:#fff;font-family:Arial,sans-serif}
.n6-logo{position:absolute;top:6%;left:0;right:0;text-align:center;font-weight:900;font-family:"Arial Black",Arial;font-size:clamp(28px,5vw,56px);letter-spacing:.02em}
.n6-logo span{color:var(--c);text-shadow:0 4px 0 #000a}
.n6-shelf{position:absolute;left:0;right:0;top:24%;height:46%;display:flex;gap:18px;align-items:flex-end;padding:0 6% 26px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;background:linear-gradient(transparent calc(100% - 26px),#3b3b40 calc(100% - 26px),#1b1b1e)}
.n6-cart{flex:none;width:128px;height:150px;background:linear-gradient(#66666b,#3e3e43)!important;border-radius:12px 12px 4px 4px;padding:16px 12px 34px!important;box-shadow:inset 0 -16px 0 #2b2b2f,0 6px 14px #000a;position:relative}
.n6-cart::before{content:"";position:absolute;left:14px;right:14px;top:5px;height:6px;background:repeating-linear-gradient(90deg,#2e2e32 0 4px,transparent 4px 8px);border-radius:2px}
.n6-label{display:block;width:100%;height:100%;border-radius:4px;border:2px solid #1c1c1f;background-color:#e4322b}
.n6-cart.on{transform:translateY(-44px);box-shadow:inset 0 -16px 0 #2b2b2f,0 0 0 3px #ffcc00,0 22px 30px #000c}
.n6-name{position:absolute;top:73%;left:0;right:0;text-align:center;font-size:22px;font-weight:700}
.n6-apps{position:absolute;bottom:5%;left:0;right:0;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.n6-app{padding:8px 16px;border-radius:6px;background:#1d1d20!important;border:2px solid #333!important;font-weight:700;font-size:13px}
.n6-app:nth-child(4n+1).on{background:#e4322b!important;border-color:#e4322b!important}.n6-app:nth-child(4n+2).on{background:#1a5fd6!important;border-color:#1a5fd6!important}
.n6-app:nth-child(4n+3).on{background:#e0a800!important;border-color:#ffcc00!important}.n6-app:nth-child(4n).on{background:#1fa94a!important;border-color:#1fa94a!important}
.n6-clock{position:absolute;right:4%;top:4%;font-weight:700;font-size:16px;color:#ffcc00}

/* Wii U */
.cx-wiiu{background:linear-gradient(#f5f7f9,#dde2e7);color:#4a4f57;font-family:Arial,sans-serif}
.wu-top{position:absolute;top:0;left:0;right:0;height:66px;display:flex;align-items:center;gap:10px;padding:0 24px;background:linear-gradient(#fff,#eef1f4);border-bottom:1px solid #cfd5dc}
.wu-q{width:48px;height:48px;border-radius:12px;background:linear-gradient(#fff,#e4e8ec)!important;border:1px solid #c7ced6!important;font-size:20px;color:#5b6470;display:grid;place-items:center}
.wu-q.on{border-color:#14b4e6!important;box-shadow:0 0 0 3px #14b4e6}
.wu-spacer{flex:1}.wu-clock{font-weight:700;font-size:18px;color:#5b6470}
.wu-grid{position:absolute;top:96px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(5,clamp(80px,11vw,124px));gap:clamp(12px,2vw,24px)}
.wu-ic{aspect-ratio:1;border-radius:22px;background-color:#fff;border:3px solid #fff!important;box-shadow:0 3px 8px #0002;display:grid;place-items:center;font-size:36px;color:#5b6470}
.wu-ic.on{box-shadow:0 0 0 4px #14b4e6,0 0 22px #14b4e6aa;transform:scale(1.07)}
.wu-label{position:absolute;bottom:6%;left:50%;transform:translateX(-50%);padding:10px 30px;background:#fff;border-radius:30px;box-shadow:0 3px 10px #0002;font-size:20px;font-weight:700;white-space:nowrap;max-width:80%;overflow:hidden;text-overflow:ellipsis}

/* 3DS */
.cx-n3ds{background:radial-gradient(circle at 50% 40%,#3d4048,#121316);align-items:center;justify-content:center;font-family:Arial,sans-serif}
.n3-shell{display:flex;flex-direction:column;align-items:center}
.n3-top{position:relative;height:44vh;aspect-ratio:5/3;background:#000;border:12px solid #26272c;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px #0008}
.n3-status{position:absolute;top:0;left:0;right:0;height:24px;display:flex;gap:10px;align-items:center;padding:0 10px;font-size:12px;background:#000a;z-index:1;color:#fff}
.n3-sp{flex:1}
.n3-banner{position:absolute;inset:0;background-color:#1b1c20}
.n3-name{position:absolute;bottom:0;left:0;right:0;padding:12px 16px;background:linear-gradient(transparent,#000d);font-weight:700;font-size:18px;color:#fff}
.n3-hinge{width:62%;height:3vh;background:linear-gradient(#34353b,#1a1b1f);border-radius:0 0 10px 10px}
.n3-bottom{height:44vh;aspect-ratio:4/3;background:#eef1f4;border:12px solid #26272c;border-radius:16px;display:flex;flex-direction:column;overflow:hidden;color:#333;box-shadow:0 10px 30px #0008}
.n3-tools{display:flex;justify-content:space-between;padding:6px 8px;background:linear-gradient(#fff,#dde2e7);border-bottom:1px solid #c5ccd3}
.n3-tool{width:36px;height:30px;border-radius:8px;font-size:15px;color:#555;display:grid;place-items:center}
.n3-tool.on{background:#e4322b;color:#fff}
.n3-grid{flex:1;display:grid;grid-template-columns:repeat(5,1fr);gap:8px;padding:10px;overflow:auto;align-content:start;scrollbar-width:none}
.n3-ic{aspect-ratio:1;border-radius:10px;background-color:#fff;border:2px solid #fff!important;box-shadow:0 1px 4px #0003}
.n3-ic.on{box-shadow:0 0 0 3px #e4322b,0 0 12px #e4322b88;transform:scale(1.06)}

/* Game Boy Advance */
.cx-gba{background:radial-gradient(circle at 50% 30%,#3d3a4d,#121019);align-items:center;justify-content:center;font-family:"Courier New",monospace}
.ga-shell{position:relative;width:min(920px,94vw);height:min(430px,80vh);background:linear-gradient(160deg,#7d66da,#4b39a3);border-radius:70px 70px 150px 150px/70px 70px 170px 170px;box-shadow:inset 0 -12px 30px #0005,inset 0 6px 14px #fff3,0 20px 50px #000a;display:grid;grid-template-columns:1fr 2.3fr 1fr;align-items:center;padding:34px 30px 54px}
.ga-l,.ga-r{position:absolute;top:-12px;width:130px;height:30px;background:#3a2c80;border-radius:30px 30px 0 0;display:grid;place-items:center;color:#c9bfff;font:700 14px Arial;z-index:-1}
.ga-l{left:60px}.ga-r{right:60px}
.ga-dpad{position:relative;width:108px;height:108px;justify-self:center}
.ga-dpad i{position:absolute;background:#222;border-radius:6px;box-shadow:inset 0 -4px 0 #000}
.ga-dpad i:first-child{left:35px;width:38px;height:108px}.ga-dpad i:last-child{top:35px;height:38px;width:108px}
.ga-screen{align-self:stretch;background:#2a2a33;border-radius:14px 14px 46px 14px;padding:18px 26px 26px;display:flex;flex-direction:column;box-shadow:inset 0 0 0 2px #0006;min-height:0}
.ga-bar{display:flex;justify-content:space-between;padding:6px 10px;background:#4b39a3;color:#fff;font-weight:700;font-size:13px}
.ga-list{flex:1;overflow:auto;background:linear-gradient(#f3f0ff,#dbd5fb);padding:6px;display:flex;flex-direction:column;gap:3px;scrollbar-width:none;min-height:0}
.ga-row{display:flex;align-items:center;gap:10px;padding:5px 8px;border-radius:4px;color:#2a2350;font-weight:700;font-size:14px;text-align:left;flex:none}
.ga-row span:last-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ga-row.on{background:#4b39a3;color:#fff}
.ga-pic{width:28px;height:28px;border-radius:4px;background-color:#c9bfff;display:grid;place-items:center;font-size:14px;flex:none;image-rendering:pixelated}
.ga-ab{display:flex;gap:16px;justify-self:center;transform:rotate(-20deg)}
.ga-ab b{width:56px;height:56px;border-radius:50%;background:#2a2350;color:#9a8ce0;display:grid;place-items:center;font:700 16px Arial;box-shadow:inset 0 -4px 0 #0006}
.ga-ab b:last-child{margin-top:-24px}
.ga-brand{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);font:italic 700 12px Arial;letter-spacing:.22em;color:#ddd6ff;white-space:nowrap}

/* Epic Games */
.cx-epic{background:#121212;color:#f5f5f5;font-family:Inter,Arial,sans-serif}
.ep-nav{width:220px;flex:none;background:#18181b;padding:18px 12px;display:flex;flex-direction:column;gap:4px;overflow:auto}
.ep-logo{font:900 20px Arial;letter-spacing:.12em;padding:6px 12px 18px}
.ep-n{display:flex;gap:12px;align-items:center;padding:10px 12px;border-radius:10px;color:#a1a1aa;font-size:14px;text-align:left}
.ep-n.ep-cur{color:#fff;background:#ffffff12}
.ep-n.on{background:#ffffff26;color:#fff}
.ep-main{flex:1;overflow:auto;padding:18px 34px 40px}
.ep-head{display:flex;align-items:center;gap:16px;margin-bottom:24px;color:#a1a1aa}
.ep-search{padding:10px 18px;border-radius:24px;background:#202024;min-width:260px;font-size:14px}
.ep-sp{flex:1}
.ep-main h1{font-size:32px;margin:0 0 6px}
.ep-sort{color:#a1a1aa;font-size:13px;margin-bottom:18px}
.ep-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:24px}
.ep-card{display:flex;flex-direction:column;gap:6px;text-align:left}
.ep-art{aspect-ratio:3/4;border-radius:8px;background-color:#202024;transition:filter .2s,outline-color .2s}
.ep-t{font-size:14px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-s{font-size:12px;color:#a1a1aa}
.ep-card.on .ep-art{outline:3px solid #fff;outline-offset:3px;filter:brightness(1.12)}
.ep-card.on .ep-s{color:#26a0ff}

/* Picker preview base for the custom homes */
.iface-prev.p-custom{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;align-content:center;padding:10px}
.iface-prev.p-custom i{aspect-ratio:1;border-radius:4px;background:#fff6}

/* ===== ARCADE + AI PAGES FOR THE 12 NEWER INTERFACES ===== */
/* GameCube */
body[data-iface="gamecube"] :is(#gamesPage,#aiPage){font-family:"Trebuchet MS",Arial,sans-serif}
body[data-iface="gamecube"] :is(.arc-bar,.ai-bar) strong{text-transform:uppercase;letter-spacing:.12em;font-weight:700;color:#d9ccff}
body[data-iface="gamecube"] #gamesPage .game-card{border:2px solid #5a43a0;border-radius:16px;background:#1a0f3acc}
body[data-iface="gamecube"] #gamesPage .game-card:hover,body[data-iface="gamecube"] #gamesPage .game-card:focus-visible{border-color:#c4b1ff;box-shadow:0 0 0 3px #9b7bff,0 0 24px #9b7bffaa;transform:translateX(4px)}
body[data-iface="gamecube"] #gamesPage .game-play,body[data-iface="gamecube"] #aiPage .primary-small{border-radius:30px;background:linear-gradient(90deg,#a184ff,#6545d4);color:#fff}
body[data-iface="gamecube"] #aiPage :is(.ai-side,.ai-main){border:2px solid #7d5cd6;border-radius:20px;background:#1a0f3acc;backdrop-filter:blur(6px)}

/* Steam Deck */
body[data-iface="deck"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:16px}
body[data-iface="deck"] #gamesPage .game-card{border:0;border-radius:6px;box-shadow:0 6px 18px #000a}
body[data-iface="deck"] #gamesPage .game-art{height:auto;aspect-ratio:2/3}
body[data-iface="deck"] #gamesPage .game-body h3{font-size:13px}
body[data-iface="deck"] #gamesPage .game-card:hover,body[data-iface="deck"] #gamesPage .game-card:focus-visible{transform:scale(1.06) translateY(-4px);box-shadow:0 0 0 3px #fff,0 14px 30px #000}
body[data-iface="deck"] :is(.arc-bar,.ai-bar){background:#0e141bd8!important;backdrop-filter:blur(8px)}
body[data-iface="deck"][data-page="gamesPage"] .arc-foot{background:#0b1016}
body[data-iface="deck"] #aiPage :is(.ai-side,.ai-main){border:0;border-radius:8px;background:#23313fd0}
body[data-iface="deck"] #aiPage .primary-small,body[data-iface="deck"] #gamesPage .game-play{background:#1a9fff;color:#fff;border-radius:4px}

/* PS2 */
body[data-iface="ps2"][data-page="gamesPage"] .main,body[data-iface="ps2"][data-page="aiPage"] .main{background:radial-gradient(ellipse at 50% 100%,#0b1638,#000 60%)}
body[data-iface="ps2"] :is(.arc-bar,.ai-bar){background:#000c!important;border-bottom-color:#4f86ff33!important}
body[data-iface="ps2"] :is(.arc-bar,.ai-bar) strong{font-weight:400;letter-spacing:.24em;text-transform:uppercase;color:#cfe0ff;text-shadow:0 0 10px #3b6bff}
body[data-iface="ps2"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:26px 18px}
body[data-iface="ps2"] #gamesPage .game-card{border:0;background:none;align-items:center;text-align:center}
body[data-iface="ps2"] #gamesPage .game-art{width:110px;height:110px;margin:10px auto 0;border-radius:6px;transform:perspective(300px) rotateY(-20deg);box-shadow:0 0 0 1px #4f86ff55,0 10px 18px #000}
body[data-iface="ps2"] #gamesPage .game-body h3{font-weight:400;color:#8fa3cf}
body[data-iface="ps2"] #gamesPage .game-card:hover,body[data-iface="ps2"] #gamesPage .game-card:focus-visible{box-shadow:none;background:none}
body[data-iface="ps2"] #gamesPage .game-card:hover .game-art,body[data-iface="ps2"] #gamesPage .game-card:focus-visible .game-art{animation:p2spin 3s linear infinite;box-shadow:0 0 0 2px #9fc0ff,0 0 26px #4f86ff}
body[data-iface="ps2"] #gamesPage .game-card:hover h3{color:#fff;text-shadow:0 0 12px #9fc0ff}
body[data-iface="ps2"] #aiPage :is(.ai-side,.ai-main){border:1px solid #4f86ff33;background:#050b1fcc;border-radius:2px}
body[data-iface="ps2"] #aiPage .primary-small,body[data-iface="ps2"] #gamesPage .game-play{background:none;border:1px solid #9fc0ff;color:#fff;text-shadow:0 0 8px #3b6bff}

/* PS4 */
body[data-iface="ps4"] :is(.arc-bar,.ai-bar) strong{font-weight:300;font-size:28px}
body[data-iface="ps4"] :is(.arc-bar,.ai-bar){background:#04143799!important;backdrop-filter:blur(8px)}
body[data-iface="ps4"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
body[data-iface="ps4"] #gamesPage .game-card{border:0;border-radius:2px;background:#0e2c66b0}
body[data-iface="ps4"] #gamesPage .game-art{height:auto;aspect-ratio:1}
body[data-iface="ps4"] #gamesPage .game-card:hover,body[data-iface="ps4"] #gamesPage .game-card:focus-visible{transform:scale(1.05);box-shadow:0 0 0 3px #fff,0 0 30px #5aa0ff;z-index:2}
body[data-iface="ps4"] #aiPage :is(.ai-side,.ai-main){border:0;border-radius:4px;background:#ffffff12;backdrop-filter:blur(10px)}
body[data-iface="ps4"] #aiPage .primary-small,body[data-iface="ps4"] #gamesPage .game-play{background:#fff;color:#0b3c8f;border-radius:3px}

/* PS Vita */
body[data-iface="vita"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:22px 10px}
body[data-iface="vita"] #gamesPage .game-card{border:0;background:none;align-items:center;text-align:center;overflow:visible}
body[data-iface="vita"] #gamesPage .game-art{width:96px;height:96px;margin:8px auto 0;border-radius:50%;box-shadow:0 4px 10px #0005,inset 0 0 0 3px #fff8}
body[data-iface="vita"] #gamesPage .game-body h3{font-size:13px;text-shadow:0 1px 3px #0008}
body[data-iface="vita"] #gamesPage .game-body p{display:none}
body[data-iface="vita"] #gamesPage .game-card:hover,body[data-iface="vita"] #gamesPage .game-card:focus-visible{box-shadow:none}
body[data-iface="vita"] #gamesPage .game-card:hover .game-art,body[data-iface="vita"] #gamesPage .game-card:focus-visible .game-art{transform:scale(1.12);box-shadow:0 0 0 4px #fff,0 0 24px #fffa}
body[data-iface="vita"] :is(.arc-bar,.ai-bar){background:#0006!important}
body[data-iface="vita"] #aiPage :is(.ai-side,.ai-main){border:0;border-radius:22px;background:#ffffff26;backdrop-filter:blur(8px)}
body[data-iface="vita"] #aiPage .primary-small,body[data-iface="vita"] #gamesPage .game-play{background:#fff;color:#0670c4;border-radius:40px}

/* Xbox One */
body[data-iface="xone"] :is(#gamesPage,#aiPage){font-family:"Segoe UI",Arial,sans-serif}
body[data-iface="xone"] :is(.arc-bar,.ai-bar) strong{font-weight:300;font-size:30px;text-transform:lowercase}
body[data-iface="xone"] #gamesPage .game-list{gap:8px}
body[data-iface="xone"] #gamesPage .game-card{border:0;border-radius:0;background:#24332a}
body[data-iface="xone"] #gamesPage .game-card:hover,body[data-iface="xone"] #gamesPage .game-card:focus-visible{box-shadow:inset 0 0 0 3px #fff,0 0 0 1px #fff;transform:scale(1.03)}
body[data-iface="xone"] #gamesPage .game-play,body[data-iface="xone"] #aiPage .primary-small{background:#107c10;color:#fff;border-radius:0}
body[data-iface="xone"] #aiPage :is(.ai-side,.ai-main){border:0;border-radius:0;background:#ffffff0f}

/* Dreamcast */
body[data-iface="dreamcast"] :is(.arc-bar,.ai-bar) strong{color:#f26722;font-weight:800}
body[data-iface="dreamcast"] :is(.arc-bar,.ai-bar){background:#fffd!important}
body[data-iface="dreamcast"] #gamesPage .game-card{border:2px solid #d3c9be;border-radius:14px;background:linear-gradient(#fff,#ebe6e0);box-shadow:0 6px 16px #0002}
body[data-iface="dreamcast"] #gamesPage .game-card h3{color:#3a3a3a}
body[data-iface="dreamcast"] #gamesPage .game-card:hover,body[data-iface="dreamcast"] #gamesPage .game-card:focus-visible{border-color:#f26722;box-shadow:0 0 0 4px #f2672255,0 10px 24px #f2672244;transform:scale(1.03)}
body[data-iface="dreamcast"] #gamesPage .game-play,body[data-iface="dreamcast"] #aiPage .primary-small{background:#f26722;color:#fff;border-radius:20px}
body[data-iface="dreamcast"] #aiPage :is(.ai-side,.ai-main){border:2px solid #d3c9be;border-radius:14px;background:#fff}
body[data-iface="dreamcast"] #aiPage :is(.ai-msg,.ai-empty h3){color:#3a3a3a}

/* Nintendo 64: the Arcade is a wall of cartridges */
body[data-iface="n64"] :is(.arc-bar,.ai-bar) strong{font-family:"Arial Black",Arial;font-weight:900;color:#e4322b;text-shadow:2px 2px 0 #1a5fd6}
body[data-iface="n64"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:26px 18px;padding-top:30px}
body[data-iface="n64"] #gamesPage .game-card{position:relative;border:0;border-radius:14px 14px 4px 4px;padding:22px 12px 0;background:linear-gradient(#66666b,#3e3e43);box-shadow:inset 0 -12px 0 #2b2b2f,0 8px 16px #000a;overflow:visible}
body[data-iface="n64"] #gamesPage .game-card::before{content:"";display:block!important;position:absolute;left:16px;right:16px;top:7px;height:7px;border-radius:2px;background:repeating-linear-gradient(90deg,#2e2e32 0 4px,transparent 4px 8px)}
body[data-iface="n64"] #gamesPage .game-art{height:auto;aspect-ratio:1;border:2px solid #1c1c1f;border-radius:4px}
body[data-iface="n64"] #gamesPage .game-body{padding:8px 0 20px}
body[data-iface="n64"] #gamesPage .game-body h3{font-size:13px;color:#fff}
body[data-iface="n64"] #gamesPage .game-body p{display:none}
body[data-iface="n64"] #gamesPage .game-card:hover,body[data-iface="n64"] #gamesPage .game-card:focus-visible{transform:translateY(-14px);box-shadow:inset 0 -12px 0 #2b2b2f,0 0 0 3px #ffcc00,0 22px 30px #000c}
body[data-iface="n64"] #gamesPage .game-play,body[data-iface="n64"] #aiPage .primary-small{background:#e4322b;color:#fff;border-radius:6px}
body[data-iface="n64"] #aiPage :is(.ai-side,.ai-main){border:2px solid #3a3a3e;border-radius:10px;background:#1d1d20}

/* Wii U */
body[data-iface="wiiu"] :is(.arc-bar,.ai-bar){background:linear-gradient(#fff,#eef1f4)!important}
body[data-iface="wiiu"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:20px}
body[data-iface="wiiu"] #gamesPage .game-card{border:3px solid #fff;border-radius:22px;background:#fff;box-shadow:0 3px 8px #0002}
body[data-iface="wiiu"] #gamesPage .game-art{height:auto;aspect-ratio:1}
body[data-iface="wiiu"] #gamesPage .game-card h3{color:#4a4f57}
body[data-iface="wiiu"] #gamesPage .game-card:hover,body[data-iface="wiiu"] #gamesPage .game-card:focus-visible{box-shadow:0 0 0 4px #14b4e6,0 0 22px #14b4e6aa;transform:scale(1.05)}
body[data-iface="wiiu"] #gamesPage .game-play,body[data-iface="wiiu"] #aiPage .primary-small{background:#14b4e6;color:#fff;border-radius:30px}
body[data-iface="wiiu"] #aiPage :is(.ai-side,.ai-main){border:3px solid #fff;border-radius:22px;background:#fff;box-shadow:0 3px 10px #0002}

/* 3DS: the list sits in a bottom screen */
body[data-iface="n3ds"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;padding:16px;border:12px solid #26272c;border-radius:18px;background:#eef1f4}
body[data-iface="n3ds"] #gamesPage .game-card{border:2px solid #fff;border-radius:12px;background:#fff;box-shadow:0 1px 4px #0003}
body[data-iface="n3ds"] #gamesPage .game-art{height:96px}
body[data-iface="n3ds"] #gamesPage .game-card h3{font-size:12px;color:#333}
body[data-iface="n3ds"] #gamesPage :is(.game-body p,.game-play){display:none}
body[data-iface="n3ds"] #gamesPage .game-card:hover,body[data-iface="n3ds"] #gamesPage .game-card:focus-visible{box-shadow:0 0 0 3px #e4322b,0 0 12px #e4322b88;transform:scale(1.05)}
body[data-iface="n3ds"] #aiPage .ai-main{border:12px solid #26272c;border-radius:18px;background:#eef1f4;color:#333}
body[data-iface="n3ds"] #aiPage .ai-main :is(.ai-msg,.ai-empty h3){color:#333}
body[data-iface="n3ds"] #aiPage .ai-side{border:12px solid #26272c;border-radius:18px;background:#000}
body[data-iface="n3ds"] #aiPage .primary-small{background:#e4322b;color:#fff}

/* Game Boy Advance: purple shell around a colour LCD */
body[data-iface="gba"] :is(#gamesPage,#aiPage),body[data-iface="gba"] :is(#gamesPage,#aiPage) :is(h3,input,button,textarea){font-family:var(--mono)}
body[data-iface="gba"] :is(.arc-bar,.ai-bar) strong{text-transform:uppercase;font-weight:800;letter-spacing:.08em}
body[data-iface="gba"] #gamesPage .game-list{gap:6px;padding:14px;border:16px solid #4b39a3;border-radius:18px 18px 40px 18px;background:linear-gradient(#f3f0ff,#dbd5fb)}
body[data-iface="gba"] #gamesPage .game-card{border:0;border-radius:6px;background:#ffffff99}
body[data-iface="gba"] #gamesPage .game-card h3{color:#2a2350;font-weight:800}
body[data-iface="gba"] #gamesPage .game-card p{color:#6a5fb0}
body[data-iface="gba"] #gamesPage .game-card:hover,body[data-iface="gba"] #gamesPage .game-card:focus-visible{background:#4b39a3;box-shadow:none}
body[data-iface="gba"] #gamesPage .game-card:hover :is(h3,p),body[data-iface="gba"] #gamesPage .game-card:focus-visible :is(h3,p){color:#fff}
body[data-iface="gba"] #aiPage .ai-main{border:16px solid #4b39a3;border-radius:18px 18px 40px 18px;background:linear-gradient(#f3f0ff,#dbd5fb)}
body[data-iface="gba"] #aiPage .ai-main :is(.ai-msg,.ai-empty h3){color:#2a2350}
body[data-iface="gba"] #aiPage .ai-side{border:2px solid #4a3f86}

/* Epic Games */
body[data-iface="epic"] :is(.arc-bar,.ai-bar) strong{font-size:30px;font-weight:700}
body[data-iface="epic"] #gamesPage .game-list{grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:24px}
body[data-iface="epic"] #gamesPage .game-card{border:0;background:none}
body[data-iface="epic"] #gamesPage .game-art{height:auto;aspect-ratio:3/4;border-radius:8px}
body[data-iface="epic"] #gamesPage .game-body{padding:8px 2px}
body[data-iface="epic"] #gamesPage .game-card:hover,body[data-iface="epic"] #gamesPage .game-card:focus-visible{box-shadow:none}
body[data-iface="epic"] #gamesPage .game-card:hover .game-art,body[data-iface="epic"] #gamesPage .game-card:focus-visible .game-art{outline:3px solid #fff;outline-offset:3px;filter:brightness(1.12)}
body[data-iface="epic"] #gamesPage .game-play,body[data-iface="epic"] #aiPage .primary-small{background:#0078f2;color:#fff;border-radius:10px}
body[data-iface="epic"] #aiPage :is(.ai-side,.ai-main){border:0;border-radius:12px;background:#202024}

/* ===== CARTRIDGE INSERT: plays over every game launch on cartridge consoles ===== */
.cart-boot{position:fixed;inset:0;z-index:4000;display:grid;place-items:center;overflow:hidden;background:radial-gradient(circle at 50% 45%,#2a2a30,#060607 75%);animation:cbOut .35s ease var(--out,2.3s) forwards;cursor:pointer}
.cb-stage{position:relative}
.cb-cart{position:absolute;z-index:2;animation:cbDrop .75s cubic-bezier(.45,0,.8,1) .15s both}
.cb-label{position:absolute;background-size:cover;background-position:center;background-color:#555}
.cb-title{position:absolute;left:0;right:0;font:800 11px/1.1 Arial,sans-serif;text-align:center;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.cb-front{position:absolute;left:0;right:0;bottom:0;z-index:3;animation:cbBump .2s ease-out .88s}
.cb-back{position:absolute;left:0;right:0;z-index:1;animation:cbBump .2s ease-out .88s}
.cb-led{position:absolute;width:10px;height:10px;border-radius:50%;background:#3a0b08;animation:cbLed .05s linear 1s forwards}
@keyframes cbDrop{0%{transform:translateY(-340px);opacity:0}12%{opacity:1}86%{transform:translateY(5px)}100%{transform:translateY(0)}}
@keyframes cbBump{40%{transform:translateY(4px)}}
@keyframes cbLed{to{background:var(--led,#ff2a1a);box-shadow:0 0 8px var(--led,#ff2a1a),0 0 22px var(--led,#ff2a1a)}}
@keyframes cbOut{to{opacity:0;visibility:hidden}}

/* N64: the cartridge goes into the top slot, the power light comes on, then the TV warms up */
.cb-n64{--out:2.5s}
.cb-n64 .cb-stage{width:640px;height:470px}
.cb-n64 .cb-back{bottom:176px;height:120px;border-radius:70px 70px 0 0/50px 50px 0 0;background:linear-gradient(#2c2c30,#424247)}
.cb-n64 .cb-back::before{content:"";position:absolute;left:50%;bottom:0;width:236px;height:38px;margin-left:-118px;border-radius:6px 6px 0 0;background:linear-gradient(#060607,#1a1a1d);box-shadow:inset 0 4px 10px #000}
.cb-n64 .cb-back::after{content:"";position:absolute;left:40px;right:40px;bottom:14px;height:3px;background:#2a2a2e;box-shadow:0 -10px 0 #2a2a2e}
.cb-n64 .cb-cart{left:50%;bottom:120px;width:200px;height:230px;margin-left:-100px;border-radius:16px 16px 4px 4px;background:linear-gradient(90deg,#4a4a4f,#6e6e74 40%,#58585d);box-shadow:inset 0 2px 0 #8a8a90,0 10px 20px #0008}
.cb-n64 .cb-cart::before{content:"";position:absolute;left:22px;right:22px;top:10px;height:12px;border-radius:3px;background:repeating-linear-gradient(90deg,#333337 0 5px,transparent 5px 10px)}
.cb-n64 .cb-label{left:18px;right:18px;top:34px;height:130px;border:3px solid #222;border-radius:4px}
.cb-n64 .cb-title{top:170px;padding:4px 18px;color:#eee}
.cb-n64 .cb-front{height:200px;border-radius:0 0 60px 60px/0 0 40px 40px;background:linear-gradient(#45454a 0,#2b2b2f 18%,#1d1d20);box-shadow:inset 0 3px 0 #5a5a60,0 20px 40px #000c}
.cb-n64 .cb-front::before{content:"NINTENDO64";position:absolute;left:0;right:0;top:46px;text-align:center;font:900 26px "Arial Black",Arial;letter-spacing:.04em;background:linear-gradient(90deg,#e4322b 0 25%,#1a5fd6 25% 50%,#ffcc00 50% 75%,#1fa94a 75%);-webkit-background-clip:text;background-clip:text;color:transparent;opacity:.9}
.cb-n64 .cb-front::after{content:"";position:absolute;left:50%;bottom:28px;width:52px;height:52px;margin-left:-160px;border-radius:50%;background:radial-gradient(circle,#0b0b0c 0 40%,#2e2e32 42% 60%,transparent 62%);box-shadow:84px 0 0 -2px #121214,168px 0 0 -2px #121214,252px 0 0 -2px #121214}
.cb-n64 .cb-led{left:70px;top:58px}
.cb-n64 .cb-sw{position:absolute;top:44px;width:46px;height:20px;border-radius:5px;background:#18181b;box-shadow:inset 0 2px 4px #000}
.cb-n64 .cb-sw.pw{left:110px}.cb-n64 .cb-sw.rs{right:110px}
.cb-n64 .cb-sw.pw::after{content:"";position:absolute;top:3px;left:4px;width:16px;height:14px;border-radius:3px;background:#77777d;animation:cbSwitch .12s ease .95s forwards}
@keyframes cbSwitch{to{left:26px}}
.cb-tv{position:fixed;inset:0;z-index:5;background:#000;opacity:0;animation:cbTv .01s linear 1.25s forwards}
.cb-tv-in{position:absolute;inset:0;display:grid;place-items:center;background-size:cover;background-position:center;transform:scale(1,.004);filter:brightness(5);animation:cbCrt .5s cubic-bezier(.2,.8,.2,1) 1.3s forwards}
.cb-tv-in::before{content:"";position:absolute;inset:0;background:radial-gradient(circle,transparent 40%,#000c),#0006}
.cb-tv-in::after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(#0000 0 2px,#0004 2px 4px);pointer-events:none}
.cb-tv-in strong{position:relative;z-index:1;font:900 clamp(30px,6vw,72px)/1 "Arial Black",Arial;color:#fff;text-shadow:0 4px 0 #000,0 0 30px #000;text-align:center;padding:0 5%}
@keyframes cbTv{to{opacity:1}}
@keyframes cbCrt{60%{transform:scale(1,1);filter:brightness(1.6)}to{transform:scale(1,1);filter:brightness(1)}}

/* Handhelds: the cartridge slides into the top of the device, then the screen boots and the logo drops in */
.cb-hh .cb-screen{position:absolute;overflow:hidden;display:grid;place-items:center;background:#20231c;animation:cbLit .3s ease .95s forwards}
.cb-hh .cb-logo{font:900 26px/1 Arial,sans-serif;letter-spacing:.06em;transform:translateY(-150px);animation:cbLogo .9s 1s forwards}
.cb-hh .cb-sub{position:absolute;bottom:12%;left:6%;right:6%;text-align:center;font:700 12px/1.2 "Courier New",monospace;opacity:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;animation:cbTv .2s ease 1.95s forwards}
@keyframes cbLogo{to{transform:translateY(0)}}
@keyframes cbLit{to{background:var(--lcd)}}
/* Game Boy */
.cb-gb{--lcd:#9bbc0f;--out:2.4s}
.cb-gb .cb-stage{width:340px;height:600px}
.cb-gb .cb-cart{left:50%;bottom:380px;width:250px;height:220px;margin-left:-125px;border-radius:6px 6px 4px 4px;background:linear-gradient(90deg,#9d9c97,#b9b8b2 45%,#a6a5a0);clip-path:polygon(0 0,88% 0,100% 7%,100% 100%,0 100%)}
.cb-gb .cb-cart::before{content:"";position:absolute;left:30px;right:30px;top:12px;height:14px;background:repeating-linear-gradient(90deg,#8b8a86 0 3px,transparent 3px 7px)}
.cb-gb .cb-label{left:26px;right:26px;top:36px;height:120px;border-radius:4px}
.cb-gb .cb-title{top:162px;color:#333;padding:0 26px}
.cb-gb .cb-front{height:430px;border-radius:14px 14px 70px 14px;background:linear-gradient(90deg,#bdbbb4,#d4d2cb 40%,#c3c1ba);box-shadow:inset 0 -6px 14px #0002,0 20px 40px #000a}
.cb-gb .cb-bezel{position:absolute;left:26px;right:26px;top:26px;height:190px;border-radius:10px 10px 40px 10px;background:#5d5f72}
.cb-gb .cb-screen{left:52px;right:36px;top:22px;bottom:30px;border-radius:2px}
.cb-gb .cb-logo{color:#0f380f;animation-timing-function:steps(10,end)}
.cb-gb .cb-sub{color:#306230}
.cb-gb .cb-led{left:16px;top:66px}
.cb-gb .cb-dpad{position:absolute;left:36px;top:268px;width:84px;height:84px;background:linear-gradient(#222,#222) center/28px 84px no-repeat,linear-gradient(#222,#222) center/84px 28px no-repeat}
.cb-gb .cb-ab{position:absolute;right:30px;top:258px;width:46px;height:46px;border-radius:50%;background:#9a2257;box-shadow:-60px 24px 0 #9a2257;transform:rotate(-25deg)}
/* Game Boy Advance */
.cb-gba{--lcd:linear-gradient(#f3f0ff,#dbd5fb);--led:#3dff5a;--out:2.3s}
.cb-gba .cb-stage{width:620px;height:430px}
.cb-gba .cb-cart{left:50%;bottom:270px;width:230px;height:140px;margin-left:-115px;border-radius:8px 8px 3px 3px;background:linear-gradient(90deg,#3d3d44,#55555e 45%,#46464e)}
.cb-gba .cb-label{left:20px;right:20px;top:14px;height:84px;border-radius:3px}
.cb-gba .cb-title{top:104px;color:#ddd;padding:0 20px}
.cb-gba .cb-front{height:320px;border-radius:60px 60px 140px 140px/60px 60px 160px 160px;background:linear-gradient(160deg,#7d66da,#4b39a3);box-shadow:inset 0 -12px 30px #0005,inset 0 6px 14px #fff3,0 20px 40px #000a}
.cb-gba .cb-bezel{position:absolute;left:50%;top:30px;width:300px;height:210px;margin-left:-150px;border-radius:12px 12px 40px 12px;background:#2a2a33}
.cb-gba .cb-screen{left:22px;right:22px;top:18px;bottom:26px;border-radius:3px}
.cb-gba .cb-logo{color:#4b39a3;transform:translateY(-150px) scale(.6);animation-timing-function:cubic-bezier(.3,1.4,.5,1)}
.cb-gba .cb-logo{animation-name:cbLogoA}
@keyframes cbLogoA{to{transform:translateY(0) scale(1)}}
.cb-gba .cb-sub{color:#4b39a3}
.cb-gba .cb-led{left:118px;top:70px}
.cb-gba .cb-dpad{position:absolute;left:54px;top:110px;width:84px;height:84px;background:linear-gradient(#222,#222) center/28px 84px no-repeat,linear-gradient(#222,#222) center/84px 28px no-repeat}
.cb-gba .cb-ab{position:absolute;right:56px;top:100px;width:46px;height:46px;border-radius:50%;background:#2a2350;box-shadow:-56px 26px 0 #2a2350}
/* DS / 3DS: a small game card into the back */
.cb-ds{--lcd:linear-gradient(#ffffff,#dfe7ef);--led:#3dd2ff;--out:2.3s}
.cb-ds .cb-stage{width:480px;height:600px}
.cb-ds .cb-cart{left:50%;bottom:470px;width:120px;height:120px;margin-left:-60px;border-radius:6px 6px 3px 3px;background:linear-gradient(90deg,#2e2f34,#45464d 45%,#36373c)}
.cb-ds .cb-label{left:10px;right:10px;top:10px;height:78px;border-radius:3px}
.cb-ds .cb-title{top:94px;color:#ddd;font-size:9px;padding:0 8px}
.cb-ds .cb-front{height:520px;background:none}
.cb-ds .cb-lid,.cb-ds .cb-base{position:absolute;left:0;right:0;border-radius:18px;background:linear-gradient(#3a3b42,#24252a);box-shadow:inset 0 2px 0 #5a5b63,0 16px 30px #000a}
.cb-ds .cb-lid{top:0;height:250px}
.cb-ds .cb-base{bottom:0;height:250px}
.cb-ds .cb-lid .cb-screen{left:50px;right:50px;top:24px;bottom:24px;border:4px solid #000;border-radius:4px}
.cb-ds .cb-base::before{content:"";position:absolute;left:90px;right:90px;top:26px;bottom:50px;background:#111;border:4px solid #000;border-radius:4px}
.cb-ds .cb-logo{color:#2a3b55;animation-timing-function:cubic-bezier(.3,1.4,.5,1)}
.cb-ds .cb-sub{color:#2a3b55}
.cb-ds .cb-led{left:24px;bottom:24px}
.cb-n3ds{--led:#3dd2ff}
.cb-n3ds .cb-lid,.cb-n3ds .cb-base{background:linear-gradient(#5a1d20,#2e0e10);box-shadow:inset 0 2px 0 #8a3a3e,0 16px 30px #000a}
@media (prefers-reduced-motion:reduce){.cart-boot{display:none}}

/* ===== DISC LOAD: GameCube, PS2 and Dreamcast. Lid (or tray) opens, the disc goes in, it closes, the console boots ===== */
.cart-boot[class*="dk-"]{--out:3s}
.dk-body{position:absolute;inset:0;z-index:2}
.dk-well,.dk-lid,.dk-disc{position:absolute;left:50%;top:50%;border-radius:50%}
.dk-well{z-index:1;box-shadow:inset 0 8px 18px #000}
.dk-well::after{content:"";position:absolute;left:50%;top:50%;width:26px;height:26px;margin:-13px;border-radius:50%;background:radial-gradient(circle,#777 0 30%,#333 32%)}
.dk-lid{z-index:3;transform-origin:50% 0;animation:dkLid 1.25s cubic-bezier(.5,0,.3,1) .1s both}
@keyframes dkLid{0%{transform:perspective(700px) rotateX(0)}28%,72%{transform:perspective(700px) rotateX(-105deg)}100%{transform:perspective(700px) rotateX(0)}}
.dk-disc{z-index:2;background-size:cover;background-position:center;background-color:#ccc;box-shadow:inset 0 0 0 3px #e4e4ecaa,0 8px 16px #0009;animation:dkDisc .5s cubic-bezier(.3,0,.6,1) .45s both}
.dk-disc::before{content:"";position:absolute;inset:40%;border-radius:50%;background:#111;box-shadow:0 0 0 7px #d9dbe3cc,0 0 0 8px #0004}
.dk-disc::after{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 20deg,#fff0,#fff7 8%,#fff0 18%,#8ff6 30%,#fff0 45%,#fff6 58%,#fff0 70%,#f8f5 84%,#fff0);mix-blend-mode:screen}
@keyframes dkDisc{0%{transform:translateY(-280px) scale(1.25) rotate(-40deg);opacity:0}30%{opacity:1}100%{transform:none}}
.dk-btn{position:absolute;border-radius:50%}
.dk-boot{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;opacity:0;animation:cbTv .45s ease 1.55s forwards;overflow:hidden}
.dk-logo{position:relative;font:900 clamp(30px,5vw,52px)/1 Arial,sans-serif;letter-spacing:.22em;opacity:0;animation:cbTv .6s ease 1.95s forwards}
.dk-name{position:relative;font:600 16px Arial,sans-serif;opacity:0;animation:cbTv .4s ease 2.25s forwards;max-width:80%;text-align:center}

/* GameCube: purple cube from above, round lid, mini disc */
.dk-gamecube .cb-stage{width:380px;height:380px}
.dk-gamecube .dk-body{border-radius:30px;background:linear-gradient(145deg,#6d57ba,#3e2c80);box-shadow:inset 0 4px 0 #9583dc,inset 0 -10px 22px #0005,0 26px 50px #000b}
.dk-gamecube .dk-well{width:236px;height:236px;margin:-118px;background:radial-gradient(circle,#1d1438 0 40%,#120a26 70%)}
.dk-gamecube .dk-lid{width:236px;height:236px;margin:-118px;background:radial-gradient(circle at 40% 35%,#8069d4,#4a35a0);box-shadow:inset 0 0 0 3px #9583dc,inset 0 0 0 14px #5a44b0,0 6px 12px #0006}
.dk-gamecube .dk-lid::after{content:"";position:absolute;inset:38%;border:7px solid #c4b6ff;border-right-color:transparent;border-radius:6px;opacity:.6}
.dk-gamecube .dk-disc{width:150px;height:150px;margin:-75px}
.dk-gamecube .cb-led{left:34px;bottom:30px;--led:#3dff5a}
.dk-gamecube .dk-btn{right:30px;bottom:24px;width:30px;height:30px;background:#2c1f5e;box-shadow:inset 0 -3px 0 #0006,-48px 0 0 #2c1f5e}
.dk-gamecube .dk-boot{background:radial-gradient(ellipse at 50% 40%,#6a4bc4,#2d1a63 55%,#120a2a);color:#efe9ff}
.dk-gamecube .dk-cube{width:150px;height:150px;perspective:700px;display:grid;place-items:center;margin-bottom:18px}
.dk-gamecube .dk-cube .gc-cube{animation-duration:2.4s}
.dk-gamecube .dk-logo{color:#d9ccff;text-shadow:0 0 24px #9b7bff}

/* PS2: black slab from above, the tray slides out, the disc drops on, the tray slides back */

.dk-ps2 .dk-body{bottom:auto;height:270px;border-radius:10px;background:linear-gradient(90deg,#16171c,#22232a 50%,#16171c);box-shadow:inset 0 -6px 0 #0a0a0d,inset 0 2px 0 #34353e,0 26px 50px #000b}
.dk-ps2 .dk-body::before{content:"";position:absolute;inset:18px 18px 40px;border-radius:6px;background:repeating-linear-gradient(90deg,#1e1f25 0 7px,#141519 7px 14px);opacity:.85}
.dk-ps2 .dk-body::after{content:"HORIZON";position:absolute;left:0;right:0;bottom:12px;text-align:center;font:700 12px Arial;letter-spacing:.5em;color:#6f88c0}
.dk-ps2 .dk-tray{position:absolute;z-index:1;left:50%;top:20px;width:300px;height:260px;margin-left:-150px;border-radius:0 0 12px 12px;background:linear-gradient(#2a2b32,#1f2026);box-shadow:inset 0 0 0 2px #34353e,0 10px 20px #0009;animation:dkTray 1.25s cubic-bezier(.5,0,.3,1) .1s both}
.dk-ps2 .dk-tray::before{content:"";position:absolute;left:50%;top:22px;width:228px;height:228px;margin-left:-114px;border-radius:50%;background:#15161a;box-shadow:inset 0 6px 14px #000}
@keyframes dkTray{0%{transform:translateY(0)}28%,72%{transform:translateY(240px)}100%{transform:translateY(0)}}
.dk-ps2 .dk-disc{top:136px;width:212px;height:212px;margin:-106px}
.dk-ps2 .cb-led{right:28px;bottom:16px;--led:#3dff5a}
.dk-ps2 .dk-btn{right:50px;bottom:14px;width:14px;height:14px;background:#2a5bff;box-shadow:0 0 6px #2a5bff}
.dk-ps2 .dk-boot{background:radial-gradient(ellipse at 50% 100%,#0b1638,#000 60%);color:#cfe0ff}
.dk-ps2 .dk-glow{position:absolute;left:0;right:0;bottom:0;height:70%;background:repeating-linear-gradient(90deg,transparent 0 6%,#4f86ff22 6% 8%,transparent 8% 13%,#9fc0ff1a 13% 14%);mask:linear-gradient(transparent,#000 40%,transparent);filter:blur(3px);animation:dkRise 1.4s ease 1.6s both}
@keyframes dkRise{from{transform:scaleY(.1);opacity:0}to{transform:none;opacity:1}}
.dk-ps2 .dk-logo{font-weight:400;letter-spacing:.4em;color:#fff;text-shadow:0 0 14px #9fc0ff,0 0 40px #3b6bff}
.dk-ps2 .dk-name{color:#8fa3cf;letter-spacing:.12em}

/* Dreamcast: white console from above, pop-up lid with the swirl, GD-ROM */
.dk-dreamcast .cb-stage{width:400px;height:380px}
.dk-dreamcast .dk-body{border-radius:34px 34px 46px 46px;background:linear-gradient(145deg,#f6f4f0,#d8d4ce);box-shadow:inset 0 4px 0 #fff,inset 0 -10px 22px #0002,0 26px 50px #000b}
.dk-dreamcast .dk-body::after{content:"";position:absolute;left:70px;right:70px;bottom:12px;height:14px;background:repeating-linear-gradient(90deg,#c9c4bd 0 46px,transparent 46px 68px);border-radius:3px}
.dk-dreamcast .dk-well{width:250px;height:250px;margin:-125px;margin-top:-140px;background:radial-gradient(circle,#2e2e30 0 40%,#1d1d1f 70%)}
.dk-dreamcast .dk-lid{width:250px;height:250px;margin:-125px;margin-top:-140px;background:radial-gradient(circle at 40% 35%,#fbfaf7,#e2ded8);box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 10px #ece8e2,0 6px 12px #0003}
.dk-dreamcast .dk-lid::after{content:"";position:absolute;inset:32%;border-radius:50%;background:repeating-radial-gradient(circle at 46% 54%,#f26722 0 5px,transparent 5px 12px);mask:conic-gradient(#000,transparent 85%)}
.dk-dreamcast .dk-disc{width:210px;height:210px;margin:-105px;margin-top:-120px}
.dk-dreamcast .cb-led{left:40px;bottom:40px;--led:#ff8a1a}
.dk-dreamcast .dk-btn{right:40px;bottom:36px;width:34px;height:34px;background:#e6e2dc;box-shadow:inset 0 -3px 0 #0002,0 0 0 2px #cfc9c1}
.dk-dreamcast .dk-boot{background:radial-gradient(circle at 50% 45%,#fff,#ede7e0 65%,#d6cdc2);color:#3a3a3a}
.dk-dreamcast .dk-boot .dc-swirl{opacity:.85;width:min(46vh,380px)}
.dk-dreamcast .dk-logo{color:#f26722;margin-top:34vh}
.dk-dreamcast .dk-name{color:#7a7068}

/* ===== SLOT LOADERS (PS3, PS4, PS5, Xbox, Xbox One) + Xbox 360 tray ===== */
.dk-slot .cb-stage{width:560px;height:560px}
.dk-slot .dk-body{bottom:auto;height:290px}
.dk-slot .dk-body::after{content:"";position:absolute;left:31%;right:31%;bottom:-11px;height:5px;border-radius:3px;background:#000;box-shadow:0 0 0 1px #ffffff1c}
.dk-slot .dk-disc{top:330px;width:200px;height:200px;margin:0 0 0 -100px;z-index:1;animation:dkSlot 1.15s cubic-bezier(.5,0,.45,1) .1s both}
@keyframes dkSlot{0%{transform:translateY(240px) rotate(-40deg);opacity:0}35%{transform:none;opacity:1}50%{transform:none}100%{transform:translateY(-260px)}}
.dk-slot .cb-led{animation-delay:1.3s}
.dk-slot .dk-btn{display:none}
@keyframes dkPulse{from{transform:scale(.3);opacity:0}to{transform:scale(1);opacity:1}}

/* PS3: glossy black curve, green light */
.dk-ps3 .dk-body{border-radius:46px 46px 14px 14px;background:radial-gradient(ellipse at 35% 12%,#55565e 0,#17171b 42%,#08080a);border-bottom:18px solid #040405;box-shadow:0 26px 50px #000b}
.dk-ps3 .dk-body::before{content:"";position:absolute;inset:0 0 55% 0;border-radius:46px 46px 0 0;background:linear-gradient(#ffffff1c,transparent)}
.dk-ps3 .cb-led{right:44px;bottom:-14px;--led:#3dff5a}
.dk-ps3 .dk-boot{background:linear-gradient(160deg,#4a4e57,#121317 70%);color:#fff}
.dk-ps3 .dk-logo{font-weight:300;letter-spacing:.32em}
.dk-ps3 .dk-name{color:#c9ced8}

/* PS4: slanted slab, matte top half and glossy bottom, blue light bar */
.dk-ps4 .dk-body{clip-path:polygon(5% 0,100% 0,95% 100%,0 100%);background:linear-gradient(#2a2b31 0 52%,#0b0b0e 52%);border-bottom:18px solid #050507}
.dk-ps4 .cb-led{left:14%;right:14%;top:calc(52% - 2px);width:auto;height:4px;border-radius:2px;background:#0b1a33;--led:#2f7bff}
.dk-ps4 .dk-boot{background:radial-gradient(120% 90% at 70% 10%,#2a6fd6,#0b3c8f 35%,#031034 80%);color:#fff}
.dk-ps4 .dk-logo{font-weight:300;letter-spacing:.3em}

/* PS5: white wings around a black core, blue light strips */
.dk-ps5 .dk-body{border-radius:70px 70px 26px 26px;background:linear-gradient(90deg,#f4f5f7 0 20%,#cfd3d9 20% 21%,#121318 21% 79%,#cfd3d9 79% 80%,#f4f5f7 80%);border-bottom:18px solid #0a0a0d;box-shadow:0 26px 50px #000b}
.dk-ps5 .cb-led,.dk-ps5 .dk-btn{display:block;top:14%;bottom:14%;width:3px;height:auto;border-radius:2px;background:#0b1a33;--led:#3d8bff;animation:cbLed .05s linear 1.3s forwards}
.dk-ps5 .cb-led{left:21%}.dk-ps5 .dk-btn{right:21%}
.dk-ps5 .dk-boot{background:radial-gradient(circle at 50% 50%,#1b2a55,#05070d 60%);color:#fff}
.dk-ps5 .dk-glow{position:absolute;inset:0;background:radial-gradient(circle,#9fc4ff44,transparent 38%);animation:dkPulse 1.4s ease 1.55s both}
.dk-ps5 .dk-logo{font-weight:300;letter-spacing:.34em}

/* Xbox (Series X from above): black tower top with the green-lit vent */
.dk-xbox .dk-body{left:70px;right:70px;border-radius:18px;background:#141516;border-bottom:18px solid #0a0a0b;box-shadow:0 26px 50px #000b}
.dk-xbox .dk-body::before{content:"";position:absolute;left:50%;top:50%;width:230px;height:230px;margin:-115px;border-radius:50%;background:radial-gradient(circle,#0a0a0a 0 35%,transparent 40%) 0 0/12px 12px,radial-gradient(circle,#2bd62b55,#0b2a0b 70%);box-shadow:inset 0 0 30px #000}
.dk-xbox .cb-led{left:34px;bottom:-14px;--led:#fff}
:is(.dk-xbox,.dk-xone) .dk-boot{background:#000;color:#fff}
:is(.dk-xbox,.dk-xone) .dk-glow{position:absolute;inset:0;background:radial-gradient(circle,#2bd62b88,#107c1022 32%,transparent 58%);animation:dkPulse 1.2s ease 1.55s both}
:is(.dk-xbox,.dk-xone) .dk-logo{letter-spacing:.3em;font-weight:400}

/* Xbox One: glossy half and vented half */
.dk-xone .dk-body{border-radius:12px;background:linear-gradient(90deg,#141416 0 58%,transparent 58%),repeating-linear-gradient(90deg,#1e1f22 0 5px,#0e0f11 5px 9px);border-bottom:18px solid #070708;box-shadow:0 26px 50px #000b}
.dk-xone .dk-body::before{content:"";position:absolute;inset:0 42% 50% 0;border-radius:12px 0 0 0;background:linear-gradient(#ffffff12,transparent)}
.dk-xone .cb-led{left:40px;bottom:-14px;--led:#fff}

/* Xbox 360: the white console's tray, ring of light */
:is(.dk-ps2,.dk-x360) .cb-stage{width:560px;height:520px}
.dk-x360 .dk-body{bottom:auto;height:270px;border-radius:34px 34px 12px 12px;background:linear-gradient(#f6f6f6,#d9dbdd);box-shadow:inset 0 -6px 0 #b9bcc0,inset 0 2px 0 #fff,0 26px 50px #000b}
.dk-x360 .dk-tray{position:absolute;z-index:1;left:50%;top:20px;width:300px;height:260px;margin-left:-150px;border-radius:0 0 12px 12px;background:linear-gradient(#e4e6e8,#c9ccd0);box-shadow:inset 0 0 0 2px #fff,0 10px 20px #0006;animation:dkTray 1.25s cubic-bezier(.5,0,.3,1) .1s both}
.dk-x360 .dk-tray::before{content:"";position:absolute;left:50%;top:22px;width:228px;height:228px;margin-left:-114px;border-radius:50%;background:#b4b8bd;box-shadow:inset 0 6px 14px #0004}
.dk-x360 .dk-disc{top:136px;width:212px;height:212px;margin:-106px}
.dk-x360 .cb-led{right:40px;bottom:22px;width:46px;height:46px;border:6px solid #cfd2d4;background:#9aa0a6;--led:#6ad13a}
.dk-x360 .dk-boot{background:radial-gradient(circle at 50% 45%,#fff,#cdd2d5);color:#2a7a12}
.dk-x360 .dk-glow{width:150px;height:150px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#d8ffae,#5dc21e 45%,#1e6b0a);box-shadow:0 0 70px #5dc21e88;animation:dkPulse .7s cubic-bezier(.3,1.4,.5,1) 1.6s both;margin-bottom:16px}
.dk-x360 .dk-name{color:#5d6a5a}

/* ===== LAUNCH ANIMATIONS FOR THE REST ===== */
/* Switch: game card into the top slot, joy-cons either side */
.cb-switch{--lcd:#2d2d2d;--led:#00c3e3;--out:2.3s}
.cb-switch .cb-stage{width:640px;height:440px}
.cb-switch .cb-cart{left:150px;bottom:262px;width:96px;height:118px;border-radius:6px 6px 3px 3px;background:linear-gradient(90deg,#2e2f34,#4a4b52 45%,#36373c)}
.cb-switch .cb-label{left:8px;right:8px;top:8px;height:76px;border-radius:3px}
.cb-switch .cb-title{top:88px;color:#ddd;font-size:8px;padding:0 6px}
.cb-switch .cb-front{height:300px;border-radius:30px;background:linear-gradient(90deg,#00b4d8 0 15%,#1c1c1f 15% 85%,#ff4554 85%);box-shadow:inset 0 3px 0 #ffffff30,0 20px 40px #000a}
.cb-switch .cb-bezel{position:absolute;left:15%;right:15%;top:0;bottom:0;background:#141416;padding:0}
.cb-switch .cb-screen{left:22px;right:22px;top:18px;bottom:18px;border-radius:4px}
.cb-switch .cb-logo{color:#00c3e3;transform:translateY(0) scale(.2);opacity:0;animation-name:cbPop;animation-timing-function:cubic-bezier(.3,1.5,.5,1)}
@keyframes cbPop{to{transform:none;opacity:1}}
.cb-switch .cb-sub{color:#ccc}
.cb-switch .cb-led{left:-58px;bottom:40px;width:8px;height:8px;border-radius:2px}
.cb-switch .cb-dpad{position:absolute;left:24px;top:60px;width:46px;height:46px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#3a3a3e,#151517);box-shadow:0 4px 0 #0005}
.cb-switch .cb-ab{position:absolute;right:38px;top:56px;width:16px;height:16px;border-radius:50%;background:#1a1a1c;box-shadow:-18px 18px 0 #1a1a1c,18px 18px 0 #1a1a1c,0 36px 0 #1a1a1c}
/* PS Vita: card into the top, the OLED screen fills with blue bubbles */
.cb-vita{--lcd:linear-gradient(165deg,#28bdf5,#0670c4 50%,#033a78);--led:#3dd2ff;--out:2.3s}
.cb-vita .cb-stage{width:640px;height:440px}
.cb-vita .cb-cart{left:50%;bottom:276px;width:74px;height:92px;margin-left:-37px;border-radius:5px 5px 3px 3px;background:linear-gradient(90deg,#2e2f34,#4a4b52 45%,#36373c)}
.cb-vita .cb-label{left:6px;right:6px;top:6px;height:60px;border-radius:3px}
.cb-vita .cb-title{top:70px;color:#ddd;font-size:7px;padding:0 4px}
.cb-vita .cb-front{height:320px;border-radius:160px/160px;background:linear-gradient(#202024,#0c0c0e);box-shadow:inset 0 3px 0 #ffffff26,0 20px 40px #000a}
.cb-vita .cb-bezel{position:absolute;left:140px;right:140px;top:36px;bottom:36px;background:#000;border-radius:6px}
.cb-vita .cb-screen{inset:6px;border-radius:3px}
.cb-vita .cb-logo{color:#fff;text-shadow:0 2px 10px #0006;transform:scale(.2);opacity:0;animation-name:cbPop;animation-timing-function:cubic-bezier(.3,1.5,.5,1)}
.cb-vita .cb-sub{color:#e6f6ff}
.cb-vita .cb-led{left:-110px;top:20px}
.cb-vita .cb-dpad{position:absolute;left:52px;top:118px;width:70px;height:70px;background:linear-gradient(#2a2a2e,#2a2a2e) center/22px 70px no-repeat,linear-gradient(#2a2a2e,#2a2a2e) center/70px 22px no-repeat}
.cb-vita .cb-ab{position:absolute;right:76px;top:112px;width:20px;height:20px;border-radius:50%;background:#2a2a2e;box-shadow:-24px 24px 0 #2a2a2e,24px 24px 0 #2a2a2e,0 48px 0 #2a2a2e}

/* PSP: the UMD door on the back flips open, the UMD in its clear shell drops in */
.dk-psp .cb-stage{width:580px;height:290px}
.dk-psp .dk-body{border-radius:145px/145px;background:linear-gradient(#26272c,#0c0c0f);box-shadow:inset 0 3px 0 #ffffff22,0 26px 50px #000b}
.dk-psp .dk-well{width:160px;height:160px;margin:-80px;background:radial-gradient(circle,#18181b 0 40%,#0b0b0d 70%)}
.dk-psp .dk-lid{width:160px;height:160px;margin:-80px;background:radial-gradient(circle at 40% 35%,#34353b,#121215);box-shadow:inset 0 0 0 3px #44454c,0 6px 12px #0008}
.dk-psp .dk-lid::after{content:"";position:absolute;inset:36%;border-radius:50%;border:2px solid #55565e}
.dk-psp .dk-disc{width:116px;height:116px;margin:-58px;box-shadow:0 0 0 12px #c9d3dd44,0 0 0 13px #ffffff66,0 8px 16px #0009}
.dk-psp .cb-led{right:70px;bottom:46px;--led:#3dff5a}
.dk-psp .dk-btn{left:60px;bottom:40px;width:24px;height:24px;background:#1a1a1d;box-shadow:inset 0 -3px 0 #0006}
.dk-psp .dk-boot{background:linear-gradient(160deg,#2a2c33,#000 70%);color:#fff}
.dk-psp .dk-logo{font-weight:300;letter-spacing:.32em}

/* Wii and Wii U: the slot glows blue as it takes the disc */
:is(.dk-wii,.dk-wiiu) .dk-body::after{background:#050506;box-shadow:0 0 0 1px #3cc8ff,0 0 14px #3cc8ff,0 0 30px #3cc8ff88}
.dk-wii .dk-body{left:60px;right:60px;border-radius:26px;background:linear-gradient(#ffffff,#e4e8ec);border-bottom:18px solid #cdd3d9;box-shadow:inset 0 2px 0 #fff,0 26px 50px #000b}
.dk-wii .dk-body::before{content:"";position:absolute;inset:0 0 55% 0;border-radius:26px 26px 0 0;background:linear-gradient(#fff,transparent)}
.dk-wii .cb-led{right:34px;bottom:-14px;--led:#3cc8ff}
.dk-wiiu .dk-body{left:40px;right:40px;border-radius:24px;background:radial-gradient(ellipse at 35% 12%,#4b4c53,#141417 45%,#060607);border-bottom:18px solid #040405;box-shadow:0 26px 50px #000b}
.dk-wiiu .cb-led{right:34px;bottom:-14px;--led:#3cc8ff}
.dk-wii .dk-boot{background:radial-gradient(circle at 50% 45%,#fff,#e9edf1);color:#8a9099}
.dk-wiiu .dk-boot{background:linear-gradient(#f5f7f9,#dde2e7);color:#4a4f57}
:is(.dk-wii,.dk-wiiu) .dk-glow{order:2;width:300px;height:3px;border-radius:2px;background:#35b5e9;box-shadow:0 0 12px #35b5e9;animation:dkPulse .6s ease 1.9s both}
:is(.dk-wii,.dk-wiiu) .dk-logo{font-weight:400;letter-spacing:.3em}
:is(.dk-wii,.dk-wiiu) .dk-name{order:3}

/* Steam, Steam Deck, Epic: the launcher's "preparing to launch" card */
.lb{--out:2.2s;background:#0b0f15}
.lb-bg{position:absolute;inset:-40px;background-size:cover;background-position:center;filter:blur(20px) brightness(.4);transform:scale(1.1)}
.lb-card{position:relative;display:flex;gap:24px;align-items:center;width:min(640px,90vw);padding:26px;border-radius:12px;background:#0b0f15d0;box-shadow:0 20px 60px #000a;animation:lbIn .4s cubic-bezier(.2,.8,.2,1) both}
@keyframes lbIn{from{opacity:0;transform:translateY(24px) scale(.96)}}
.lb-cap{flex:none;width:150px;aspect-ratio:2/3;border-radius:6px;background-size:cover;background-position:center;background-color:#23313f;box-shadow:0 8px 20px #000}
.lb-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:10px;color:#fff;font-family:Arial,sans-serif}
.lb-info strong{font-size:26px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-status{display:grid;font-size:14px}
.lb-status span{grid-area:1/1;color:#b8c4cf}
.lb-st1{animation:lbSwap .25s ease 1.5s forwards}
.lb-st2{opacity:0;color:var(--lb-on,#fff)!important;font-weight:700;animation:cbTv .25s ease 1.6s forwards}
@keyframes lbSwap{to{opacity:0}}
.lb-bar{height:6px;border-radius:3px;background:#ffffff1f;overflow:hidden}
.lb-bar i{display:block;width:0;height:100%;border-radius:3px;background:var(--lb,#fff);animation:lbBar 1.35s cubic-bezier(.4,0,.2,1) .2s forwards}
@keyframes lbBar{to{width:100%}}
.lb-steam{--lb:linear-gradient(90deg,#a4d007,#5c7e10);--lb-on:#a4d007}
.lb-steam .lb-card{background:#1b2838e6;border-radius:4px}
.lb-steam .lb-status span{color:#8f98a0}
.lb-deck{--lb:#1a9fff;--lb-on:#1a9fff}
.lb-deck .lb-card{background:#0e141be6;border-radius:8px}
.lb-epic{--lb:#0078f2;--lb-on:#26a0ff}
.lb-epic .lb-card{background:#18181be6;border-radius:14px}
.lb-epic .lb-info{font-family:Inter,Arial,sans-serif}
