/* aPiStation — screen layouts */

/* ================= boot ================= */
.boot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.boot-logo { position: relative; width: 260px; height: 260px; margin-bottom: 26px; }
.boot-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 3; }
.ring-draw {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 541;
  stroke-dashoffset: 541;
  animation: draw 1.8s .2s var(--ease) forwards;
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, .8));
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.boot-pi {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 150px;
  font-weight: 700;
  line-height: 1;
  padding-bottom: 14px;
  background: linear-gradient(140deg, #ede9fe, #a78bfa 45%, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0;
  transform: scale(.6);
  animation: pop-in .9s .7s var(--spring) forwards;
  filter: drop-shadow(0 10px 40px rgba(124, 58, 237, .6));
}
@keyframes pop-in { to { opacity: 1; transform: none; } }
.boot-orbit { position: absolute; inset: -18px; animation: spin 6s linear infinite; opacity: 0; animation: spin 6s linear infinite, fade-in .6s 1.6s forwards; }
.boot-orbit i {
  position: absolute;
  top: 0;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 20px 4px #22d3ee;
}
@keyframes fade-in { to { opacity: 1; } }
.boot-word {
  font-size: 96px;
  font-weight: 200;
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(20px);
  animation: rise .9s 1.1s var(--ease) forwards;
}
.boot-word b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise { to { opacity: 1; transform: none; } }
.boot-tag {
  font-size: 22px;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--text-3);
  opacity: 0;
  animation: rise .9s 1.5s var(--ease) forwards;
}
.boot-press {
  margin-top: 70px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 26px;
  opacity: 0;
  transition: opacity .6s;
}
.boot.ready .boot-press { opacity: 1; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.boot-status {
  position: absolute;
  bottom: 54px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 19px;
  color: var(--text-3);
}
.boot-status .spinner { width: 22px; height: 22px; border-width: 3px; }

/* ================= profiles ================= */
.profiles {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
}
.profiles .brand.big { position: absolute; top: 56px; left: var(--pad-x); }
.profiles .display { margin-bottom: 50px; }
.profile-row { display: flex; gap: 70px; align-items: flex-start; }
.profile-card {
  width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 0;
  border-radius: 40px;
  transition: transform .3s var(--spring), background .3s;
}
.profile-card .ring { transition: transform .3s var(--spring), box-shadow .3s; margin-bottom: 16px; }
.profile-card.focused .ring { transform: scale(1.08); box-shadow: 0 0 0 6px #fff, 0 30px 80px -10px hsl(var(--hue, 265) 90% 60% / .8); }
.profile-card.focused { background: rgba(255, 255, 255, .05); }
.profile-card.chosen .ring { animation: chosen .6s var(--ease); }
.pf-lock { display: inline-flex; vertical-align: middle; color: var(--text-3); margin-left: 4px; }
.profile-card.guest .ring { filter: saturate(.6); }

/* PIN pad */
.pin-panel { width: 520px; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.pin-dots { display: flex; gap: 22px; margin: 6px 0; }
.pin-dots i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-3); transition: background .15s, transform .2s var(--spring), border-color .15s; }
.pin-dots i.on { background: var(--grad); border-color: transparent; transform: scale(1.15); }
.pin-error { min-height: 26px; font-size: 18px; color: var(--accent); }
.pin-keys { display: grid; grid-template-columns: repeat(3, 110px); gap: 14px; }
.pin-key { height: 78px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); font-size: 34px; font-weight: 600; display: grid; place-items: center; transition: transform .2s var(--spring), background .15s, color .15s; }
.pin-key.small { color: var(--text-2); }
.pin-key.focused { background: #fff; color: var(--ink); transform: scale(1.08); }
.pin-remember { width: 100%; margin-top: 4px; }
.pin-panel.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }
@keyframes chosen { 40% { transform: scale(1.18); } 100% { transform: scale(1.05); } }
.pf-name { font-size: 40px; font-weight: 700; }
.pf-meta { font-size: 21px; color: var(--text-2); }
.pf-stats { display: flex; gap: 18px; font-family: var(--font-num); font-size: 20px; color: var(--text-2); margin-top: 6px; }
.pf-stats > span { display: inline-flex; align-items: center; gap: 6px; }
.pf-stats .icon { color: var(--gold); }
.pf-unread .icon { color: hsl(330 90% 72%); }
.add-circle {
  width: 230px;
  height: 230px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 3px dashed var(--line-2);
  color: var(--text-3);
  margin-bottom: 16px;
  transition: transform .3s var(--spring), border-color .3s, color .3s;
}
.profile-card.add.focused .add-circle { border-color: #fff; color: #fff; transform: scale(1.06); }
.profiles .hints { position: absolute; bottom: 40px; right: var(--pad-x); }

/* ================= home ================= */
.tiles {
  position: absolute;
  top: 150px;
  left: var(--pad-x);
  right: 0;
  height: 150px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.tile {
  width: 118px;
  height: 118px;
  flex: none;
  border-radius: 32px;
  display: grid;
  place-items: center;
  background: linear-gradient(150deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: transform .35s var(--spring), background .3s, color .3s, box-shadow .3s;
}
.tile-label {
  position: absolute;
  left: calc(100% + 26px);
  top: 50%;
  transform: translateY(-50%) translateX(-10px);
  white-space: nowrap;
  font-size: 30px;
  font-weight: 600;
  color: var(--text);
  opacity: 0;
  transition: opacity .25s, transform .35s var(--ease);
  pointer-events: none;
}
.tile.selected { background: var(--grad); color: var(--ink); transform: scale(1.12); }
.tile.selected .tile-label { opacity: 1; transform: translateY(-50%) scale(.9); }
.tile.selected ~ .tile { transform: translateX(250px); }
.tile.focused { box-shadow: 0 0 0 4px #fff, 0 20px 50px -10px hsl(var(--h1) 90% 60% / .9); }

.hero {
  position: absolute;
  top: 330px;
  left: var(--pad-x);
  right: var(--pad-x);
  height: 400px;
  display: flex;
  gap: 60px;
  transition: opacity .14s, transform .2s var(--ease);
}
.hero.swap, .home-shelf.swap { opacity: 0; transform: translateY(8px); }
.hero-text { width: 860px; display: flex; flex-direction: column; gap: 18px; justify-content: center; }
.hero-text .title-xl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-desc { font-size: 24px; max-width: 800px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-text .btn-row { margin-top: 10px; }
.hero-visual { flex: 1; position: relative; display: grid; place-items: center; }

.home-shelf {
  position: absolute;
  top: 760px;
  left: var(--pad-x);
  right: 0;
  transition: opacity .14s, transform .2s var(--ease);
}
.home-shelf > .hints { position: absolute; top: 2px; right: var(--pad-x); font-size: 19px; }
.shelf-tabs { display: flex; gap: 10px; margin-left: 14px; }
.shelf-tabs .chip-btn { height: 40px; padding: 0 16px; font-size: 17px; font-weight: 500; }
.home-shelf .empty { height: 169px; display: grid; place-items: center; padding: 0 40px; color: var(--text-3); font-size: 20px; }
.home-shelf .shelf { margin-left: calc(var(--pad-x) * -1); padding-left: var(--pad-x); padding-right: var(--pad-x); margin-right: 0; }
.home-card { width: 300px; }
.home-card .card-label { font-size: 19px; margin-top: 10px; }
.home-card .card-sub { font-size: 15px; }
.icon-cover {
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle at 30% 20%, hsl(var(--ch) 90% 62% / .9), hsl(calc(var(--ch) + 40) 80% 30% / .9));
}
.home-card[data-active] .icon-cover { box-shadow: inset 0 0 0 4px var(--ok); }
.home-card[data-active] .card-sub::before { content: '● Active · '; color: var(--ok); }

/* hero visuals */
.fan { position: relative; width: 760px; height: 400px; }
.fan-item { position: absolute; top: 50%; left: 50%; transition: transform .6s var(--spring); }
.fan-item .cover { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); border: 1px solid rgba(255, 255, 255, .15); }
.fan-wide .fan-item { width: 440px; }
.fan-wide .f0 { transform: translate(-50%, -50%) translate(-150px, 40px) rotate(-8deg); z-index: 1; }
.fan-wide .f1 { transform: translate(-50%, -50%) translate(150px, 50px) rotate(7deg); z-index: 1; }
.fan-wide .f2 { transform: translate(-50%, -50%) translate(0, -40px); z-index: 2; }
.fan-poster .fan-item { width: 230px; }
.fan-poster .f0 { transform: translate(-50%, -50%) translate(-190px, 20px) rotate(-10deg); }
.fan-poster .f1 { transform: translate(-50%, -50%) translate(190px, 20px) rotate(10deg); }
.fan-poster .f2 { transform: translate(-50%, -50%) scale(1.12); z-index: 2; }
.fan .f2 .cover { box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 40px 80px -20px hsl(var(--h1) 90% 50% / .7); }

.orb {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 35%, var(--accent-2) 70%, transparent 72%);
  box-shadow: 0 0 120px 20px hsl(var(--h1) 90% 60% / .5);
  animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-18px) scale(1.03); } }

.vinyl-stack { position: relative; width: 640px; height: 380px; }
.vinyl-stack .cover { position: absolute; left: 60px; top: 10px; width: 360px; z-index: 2; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); }
.vinyl {
  position: absolute;
  left: 230px;
  top: 20px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--accent) 0 14%, #111 14.5% 16%, transparent 16.5%),
    repeating-radial-gradient(circle, #0c0c10 0 3px, #1b1b22 3px 5px);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .9);
  animation: spin 6s linear infinite;
}

.house { display: grid; grid-template-columns: repeat(4, 150px); gap: 26px; }
.house-dot {
  height: 150px;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text-3);
  font-size: 17px;
}
.house-dot.on {
  color: #1b1405;
  background: radial-gradient(circle at 50% 35%, #fff, var(--c) 60%);
  box-shadow: 0 0 calc(70px * var(--b)) calc(10px * var(--b)) color-mix(in srgb, var(--c) 70%, transparent);
  border-color: transparent;
}

.donut {
  --p: .3;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent-2) 0, var(--accent) calc(var(--p) * 1turn), rgba(255, 255, 255, .1) 0);
  box-shadow: 0 0 80px -10px hsl(var(--h1) 90% 60% / .5);
}
.donut > div {
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: var(--bg-1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.donut b { font-size: 72px; line-height: 1; }
.donut span { color: var(--text-2); }

.medal-stack { display: flex; gap: 40px; align-items: flex-end; }
.medal-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.medal-col b { font-size: 40px; }
.medal-col:nth-child(2) { transform: translateY(-20px); }
.medal-col:nth-child(3) { transform: translateY(-40px); }
.medal-col:nth-child(4) { transform: translateY(-60px); }

.friend-visual { position: relative; }
.friend-bubble {
  position: absolute;
  right: -40px;
  top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: hsl(330 90% 60%);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 40px -6px hsl(330 90% 60% / .7);
}
.gear { color: var(--accent); opacity: .8; filter: drop-shadow(0 0 40px hsl(var(--h1) 90% 60% / .6)); }

/* ================= browse (movies, games) ================= */
.backdrop {
  position: absolute;
  top: 0;
  right: 0;
  width: 1340px;
  height: 760px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 42%), linear-gradient(0deg, transparent 0, #000 38%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 42%), linear-gradient(0deg, transparent 0, #000 38%);
  mask-composite: intersect;
  opacity: .9;
}
.backdrop-art, .backdrop-art .cover { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.backdrop-art .art { width: 100%; height: 100%; }
.fade-in { animation: fade-in-soft .5s var(--ease); }
@keyframes fade-in-soft { from { opacity: 0; transform: scale(1.02); } }
.browse-info {
  position: absolute;
  top: 160px;
  left: var(--pad-x);
  width: 900px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.browse-info .title-xl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-line { display: flex; gap: 22px; align-items: center; color: var(--text-2); font-size: 22px; }
.meta-line span { display: inline-flex; align-items: center; gap: 6px; }
.meta-line .icon { color: var(--gold); }
.browse-desc { font-size: 23px; max-width: 820px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.browse-info .btn-row { margin-top: 8px; }
.browse-shelf { position: absolute; left: var(--pad-x); right: 0; top: 640px; }
.browse-shelf .shelf { margin-left: calc(var(--pad-x) * -1); padding-left: var(--pad-x); margin-right: 0; padding-right: var(--pad-x); }
.browse-poster { width: 180px; }
.browse-wide { width: 340px; }
.browse-card .card-label { font-size: 18px; margin-top: 10px; }
.screen-movies .browse-shelf { top: 600px; }
.screen-games .browse-shelf { top: 700px; }

/* ================= music ================= */
/* music: focused item on the left, what is playing on the right, rows below */
.mu-hero { position: absolute; top: 140px; left: var(--pad-x); width: 1160px; display: flex; gap: 44px; }
.mu-cover { width: 320px; flex: none; }
.mu-cover .cover { box-shadow: 0 40px 80px -25px rgba(0, 0, 0, .9); }
.mu-cover.round .cover { border-radius: 50%; }
.mu-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.mu-info .title-xl { font-size: 58px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mu-info .meta-line { font-size: 20px; flex-wrap: wrap; row-gap: 4px; }
.mu-info .nf-reason { font-size: 19px; }
.mu-info .btn-row { margin-top: 6px; flex-wrap: wrap; }
.mu-now { position: absolute; top: 212px; right: var(--pad-x); width: 480px; display: flex; flex-direction: column; gap: 6px; }
.mu-screen { position: relative; width: 480px; height: 270px; margin-bottom: 12px; border-radius: var(--r); overflow: hidden; background: rgba(0, 0, 0, .45); border: 1px solid var(--line); }
.mu-screen .cover { width: 100%; height: 100%; border-radius: 0; }
.mu-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 19px; }
.mu-idle b { color: var(--text); font-size: 26px; }
.mu-idle .icon { color: var(--accent); }
.mu-now .kicker { font-size: 15px; }
.mu-now-title { font-size: 28px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-now-artist { font-size: 19px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-progress { height: 5px; margin-top: 8px; border-radius: 5px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.mu-progress i { display: block; height: 100%; background: var(--grad); transform-origin: left; transform: scaleX(0); transition: transform .5s linear; }
.mu-times { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--text-3); }
.mu-source { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--text-2); }
.mu-source .icon { color: var(--accent); }
.mu-card { width: 200px; }
.mu-card .card-label { font-size: 17px; margin-top: 8px; }
.mu-card .card-sub { font-size: 14px; }
.mu-card .badge-corner { font-size: 13px; top: 8px; left: 8px; }
.mu-artist { text-align: center; }
.mu-artist .cover { border-radius: 50%; }
.mu-card.now .cover::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 4px var(--accent); }
.mu-skeleton { width: 200px; height: 200px; }
.mu-search-results { flex: 1; overflow: hidden; position: relative; padding: 4px 6px; }
.mu-search-results .row-title { font-size: 22px; margin: 4px 0 6px; }
.mu-search-artists { margin: -10px 0 8px calc(var(--pad-x) * -1); padding: 10px var(--pad-x) 16px; gap: 22px; }
.mu-search-songs { display: grid; grid-template-columns: repeat(8, 190px); justify-content: space-between; gap: 22px 0; padding: 8px 0; }
.mu-search-songs .mu-card, .mu-search-artists .mu-card { width: 190px; }
body[data-screen="music"] #nowplaying-host { display: none; }

/* YouTube player: docked in the Music screen, picture-in-picture elsewhere while it plays */
#yt-host {
  position: absolute;
  right: 48px;
  bottom: 40px;
  width: 400px;
  height: 225px;
  z-index: 19;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9), 0 0 0 1px var(--line);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.97);
  transition: opacity .3s, transform .4s var(--spring), visibility 0s .3s;
}
#yt-host.on { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .4s var(--spring); }
#yt-host.on.paused { opacity: 0; visibility: hidden; }
#yt-host iframe { display: block; width: 100%; height: 100%; border: 0; }
body[data-screen="music"] #yt-host { top: 212px; right: var(--pad-x); bottom: auto; width: 480px; height: 270px; border-radius: var(--r); box-shadow: none; }
body[data-screen="music"] #yt-host.on.paused { opacity: 1; visibility: visible; }
body[data-screen="boot"] #yt-host, body[data-screen="profiles"] #yt-host { display: none; }

/* ================= shared controls ================= */
.switch {
  width: 64px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  position: relative;
  flex: none;
  transition: background .25s;
}
.switch i {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  transition: transform .3s var(--spring);
}
.switch.on { background: var(--ok); }
.switch.on i { transform: translateX(28px); }
.slider-track { flex: 1; height: 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; min-width: 160px; }
.slider-track i { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .25s var(--ease); }

/* ================= smart home ================= */
.sh-scenes { position: absolute; top: 150px; left: var(--pad-x); width: 540px; }
.scene-list { display: flex; flex-direction: column; gap: 14px; }
.scene {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--line);
  transition: transform .25s var(--spring), background .2s, box-shadow .25s;
}
.scene-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  background: radial-gradient(circle at 30% 25%, hsl(var(--sh) 90% 65%), hsl(calc(var(--sh) + 40) 80% 35%));
  box-shadow: 0 10px 30px -10px hsl(var(--sh) 90% 55% / .8);
}
.scene-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.scene-text b { font-size: 25px; }
.scene-text small { font-size: 17px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-check { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #052e16; flex: none; }
.scene.active { border-color: rgba(74, 222, 128, .5); background: rgba(74, 222, 128, .08); }
.scene.focused { background: #fff; color: var(--ink); transform: scale(1.03); box-shadow: 0 20px 50px -15px hsl(var(--sh) 90% 55% / .8); }
.scene.focused small { color: rgba(10, 11, 22, .6); }

.sh-devices {
  position: absolute;
  top: 150px;
  left: 720px;
  right: 0;
  bottom: 90px;
  padding: 0 var(--pad-x) 40px 20px;
  overflow: hidden;
}
.sh-mode { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; color: var(--text-3); margin-top: 26px; }
.device-room { font-size: 14px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); position: relative; }
.device-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.device {
  height: 210px;
  padding: 20px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--glass);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  transition: transform .25s var(--spring), box-shadow .25s, background .3s;
}
.device::before {
  content: '';
  position: absolute;
  left: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--c) 75%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity .4s;
}
.device.on::before { opacity: calc(.35 + var(--b) * .65); }
.device-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .08);
  color: var(--text-3);
  position: relative;
  margin-bottom: auto;
}
.device.on .device-icon { background: var(--c); color: rgba(20, 14, 4, .85); box-shadow: 0 0 30px -4px var(--c); }
.device-name { font-size: 22px; font-weight: 600; position: relative; }
.device-state { font-size: 17px; color: var(--text-2); position: relative; }
.device .switch { position: absolute; top: 22px; right: 20px; transform: scale(.85); }
.device.focused { transform: scale(1.05); box-shadow: 0 0 0 4px #fff, 0 20px 50px -15px color-mix(in srgb, var(--c) 80%, transparent); z-index: 1; }

.device-panel { display: flex; gap: 50px; width: 1100px; align-items: center; }
.dp-preview {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  color: var(--text-3);
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line);
  flex: none;
}
.dp-preview > * { grid-area: 1 / 1; }
.dp-glow { position: absolute; inset: -30px; border-radius: 50%; background: radial-gradient(circle, var(--c), transparent 65%); opacity: 0; transition: opacity .4s, transform .4s; }
.dp-preview.on { color: #fff; }
.dp-preview.on .dp-glow { opacity: calc(.25 + var(--b) * .75); transform: scale(calc(.8 + var(--b) * .3)); }
.dp-preview .icon { position: relative; }
.dp-temp { position: absolute; bottom: 60px; font-size: 54px; font-weight: 700; color: #fff; }
.dp-controls { flex: 1; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.slider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 22px;
  transition: background .2s, box-shadow .2s;
}
.slider > span:first-child { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.slider b { width: 70px; text-align: right; }
.slider.focused { background: var(--glass-3); box-shadow: 0 0 0 3px #fff; }
.swatches { display: flex; gap: 16px; }
.swatch {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sw);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .2), 0 0 24px -6px var(--sw);
  transition: transform .2s var(--spring), box-shadow .2s;
}
.swatch.sel { box-shadow: inset 0 0 0 3px rgba(0, 0, 0, .2), 0 0 0 4px var(--bg-0), 0 0 0 7px var(--sw); }
.swatch.focused { transform: scale(1.25); box-shadow: 0 0 0 4px #fff, 0 0 30px var(--sw); }

/* ================= cloud drive ================= */
.drive-side { position: absolute; top: 130px; left: var(--pad-x); width: 760px; display: flex; flex-direction: column; gap: 16px; }
.drive-storage { display: flex; align-items: center; gap: 32px; padding: 22px 28px; }
.donut.small { width: 170px; height: 170px; flex: none; box-shadow: 0 0 60px -10px hsl(var(--h1) 90% 60% / .5); }
.donut.small > div { width: 124px; height: 124px; }
.donut.small b { font-size: 44px; }
.storage-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.storage-text p { font-size: 18px; }
.gauges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gauge { padding: 20px; border-radius: 22px; background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.gauge-top { display: flex; align-items: center; gap: 8px; font-size: 17px; color: var(--text-2); }
.gauge-top .icon { color: var(--accent); }
.gauge-value { font-size: 32px; font-weight: 600; }
.gauge .bar { height: 6px; }
.gauge.ok .bar i { background: var(--ok); }
.gauge.warn .bar i { background: var(--warn); }
.gauge.bad .bar i { background: var(--bad); }
.services { padding: 18px 28px; display: flex; flex-direction: column; gap: 2px; }
.services .row-title { margin-bottom: 4px; font-size: 22px; }
.svc { display: flex; align-items: center; gap: 16px; height: 44px; font-size: 19px; }
.drive-remote { padding: 18px 28px; display: flex; flex-direction: column; gap: 6px; }
.drive-remote .row-title { margin: 0; font-size: 22px; }
.drive-remote .tag { margin-left: auto; }
.drive-remote p { font-size: 17px; }
.svc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-2); color: var(--text-2); }
.svc-name { flex: 1; }
.drive-files { position: absolute; top: 130px; left: 900px; right: var(--pad-x); bottom: 100px; padding: 26px; display: flex; flex-direction: column; gap: 14px; }
.drive-files.dropping { box-shadow: inset 0 0 0 4px var(--accent); }
.drop-hint { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-radius: inherit; background: rgba(5, 6, 15, .82); color: var(--accent); font-size: 30px; pointer-events: none; }
.drive-files.dropping .drop-hint { display: flex; }
.files-tools { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.files-tools .chip-btn { height: 46px; font-size: 18px; }
.tools-note { font-size: 17px; }
.path-crumb { font: inherit; color: inherit; padding: 2px 6px; border-radius: 8px; }
.path-crumb:hover { background: var(--glass-2); }
a.btn { text-decoration: none; }
.file-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.file-icon.video { background: hsl(10 90% 60% / .18); color: hsl(10 90% 72%); }
.file-icon.audio { background: hsl(155 80% 50% / .18); color: hsl(155 80% 65%); }
.file-name small { font-size: 16px; }
.option-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.option-list .btn { justify-content: flex-start; }
.link-field { width: 100%; font-size: 20px; }
.pv { position: absolute; inset: 40px var(--pad-x) 30px; display: flex; flex-direction: column; gap: 18px; }
.pv-head { display: flex; align-items: center; gap: 20px; }
.pv-title { font-size: 30px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-stage { flex: 1; min-height: 0; display: grid; place-items: center; border-radius: var(--r); background: rgba(0, 0, 0, .5); overflow: hidden; }
.pv-media { max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-doc { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-text { align-self: stretch; justify-self: stretch; margin: 0; padding: 28px; overflow: hidden; white-space: pre-wrap; font: 18px/1.5 ui-monospace, monospace; color: var(--text); }
.pv-audio { display: flex; flex-direction: column; align-items: center; gap: 30px; color: var(--accent); }
.pv-audio audio { width: 640px; }
.files-head { display: flex; align-items: center; gap: 14px; font-size: 24px; font-weight: 600; }
.files-head .icon { color: var(--accent); }
.files-head i { font-style: normal; color: var(--text-3); }
.files-head small { margin-left: auto; font-size: 17px; font-weight: 400; }
.file-list { flex: 1; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.file {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 21px;
  transition: background .15s, transform .2s var(--spring), color .15s;
}
.file-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--glass-2); color: var(--text-2); flex: none; }
.file-icon.folder { background: hsl(210 90% 60% / .2); color: hsl(210 90% 72%); }
.file-icon.image { background: hsl(330 90% 60% / .18); color: hsl(330 90% 75%); }
.file-icon.music { background: hsl(155 80% 50% / .18); color: hsl(155 80% 65%); }
.file-icon.film { background: hsl(10 90% 60% / .18); color: hsl(10 90% 72%); }
.file-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size { width: 110px; text-align: right; color: var(--text-2); font-size: 18px; }
.file-date { width: 190px; text-align: right; font-size: 16px; }
.file.focused { background: #fff; color: var(--ink); transform: scale(1.01); }
.file.focused .dim, .file.focused .file-size { color: rgba(10, 11, 22, .6); }

/* ================= claude ================= */
.orb.small { width: 76px; height: 76px; flex: none; box-shadow: 0 0 50px 4px hsl(var(--h1) 90% 60% / .5); }
.orb.tiny { width: 40px; height: 40px; flex: none; animation: none; box-shadow: 0 0 20px hsl(var(--h1) 90% 60% / .5); }
.fy-main { position: absolute; top: 118px; left: 0; width: 1140px; bottom: 0; overflow: hidden; padding: 0 0 220px var(--pad-x); }
.fy-hero { display: flex; align-items: center; gap: 22px; margin: 12px 0 18px; }
.fy-hero-text { flex: 1; min-width: 0; }
.fy-headline { font-size: 38px; font-weight: 700; line-height: 1.12; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fy-hero p { font-size: 18px; }
.fy-row .row-title { margin: 4px 0 10px; font-size: 24px; }
.fy-row .shelf { margin: -14px 0 -8px calc(var(--pad-x) * -1); padding: 14px var(--pad-x) 20px; gap: 20px; }
.fy-card { width: 196px; }
.fy-card .card-label { font-size: 17px; margin-top: 8px; }
.fy-card .card-sub { font-size: 14px; }
.fy-card .badge-corner { font-size: 13px; top: 8px; left: 8px; }
.fy-reason { margin-top: 4px; font-size: 14px; line-height: 1.3; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.fy-card.focused .fy-reason { color: var(--text); }
.fy-skeleton { width: 196px; height: 196px; }
.fy-row .empty { padding: 30px 0; font-size: 18px; }

.ai-chat { position: absolute; top: 130px; left: 1170px; right: var(--pad-x); bottom: 100px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.ai-chat .chat-title { font-size: 26px; }
.ai-chat .msg-body { font-size: 19px; padding: 14px 18px; }
.ai-chat .chip-btn { height: 42px; font-size: 16px; padding: 0 14px; }
.chat-head { display: flex; align-items: center; justify-content: space-between; }
.chat-title { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 700; }
.chat-title .icon { color: var(--accent); }
.chat-log { flex: 1; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 16px; padding: 6px; scroll-behavior: smooth; }
.msg { display: flex; gap: 14px; align-items: flex-start; max-width: 88%; animation: msg-in .35s var(--spring); }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.msg-body { padding: 16px 22px; border-radius: 22px; font-size: 21px; line-height: 1.45; display: flex; flex-direction: column; gap: 12px; }
.msg.ai .msg-body { background: var(--glass-2); border: 1px solid var(--line); border-top-left-radius: 6px; }
.msg.user { align-self: flex-end; }
.msg.user .msg-body { background: var(--grad); color: var(--ink); font-weight: 500; border-top-right-radius: 6px; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  font-size: 19px;
  transition: transform .2s var(--spring), background .2s, color .2s;
}
.chip-btn .icon { color: var(--accent); }
.chip-btn.focused { background: #fff; color: var(--ink); transform: scale(1.06); }
.chip-btn.focused .icon { color: var(--ink); }
.chat-input { display: flex; gap: 14px; align-items: center; }
.chat-input .field { flex: 1; height: 66px; font-size: 24px; }

/* ================= friends ================= */
.friends-layout { position: absolute; top: 140px; left: var(--pad-x); right: var(--pad-x); bottom: 100px; display: grid; grid-template-columns: 520px 1fr 1fr; gap: 36px; }
.friend-card { padding: 40px 34px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.friend-card .ring { margin-bottom: 10px; }
.presence { display: inline-flex; align-items: center; gap: 10px; padding: 8px 18px; border-radius: 999px; background: var(--glass); font-size: 18px; color: var(--text-2); margin-top: 6px; }
.presence.on { color: #bbf7d0; background: rgba(74, 222, 128, .12); }
.friend-stats { display: flex; gap: 24px; font-size: 19px; color: var(--text-2); margin: 10px 0; }
.friend-stats span { display: inline-flex; align-items: center; gap: 8px; }
.friend-stats .icon { color: var(--gold); }
.friend-actions { display: flex; flex-direction: column; gap: 14px; width: 100%; margin-top: auto; }
.friends-col { display: flex; flex-direction: column; min-height: 0; }
.inbox-list, .feed { flex: 1; overflow: hidden; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 6px; }
.inbox-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  transition: transform .25s var(--spring), box-shadow .25s, background .2s;
}
.inbox-item .cover { width: 110px; border-radius: 14px; }
.inbox-item .cover-wide { width: 150px; }
.inbox-item.new { border-color: hsl(330 90% 70% / .5); }
.inbox-body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inbox-from { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--text-2); }
.inbox-title { font-size: 23px; font-weight: 600; }
.inbox-msg { font-size: 18px; color: var(--text-2); font-style: italic; }
.inbox-item.focused { background: rgba(255, 255, 255, .14); transform: scale(1.03); box-shadow: 0 0 0 4px #fff; }
.pick-play { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--glass-2); flex: none; opacity: .6; transition: opacity .2s, background .2s; }
.inbox-item.focused .pick-play { opacity: 1; background: #fff; color: var(--ink); }
.inbox-item.focused .pick-play { opacity: 1; background: #fff; color: var(--ink); }
.feed-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  transition: background .2s;
}
.feed-text { flex: 1; font-size: 19px; color: var(--text-2); display: flex; flex-direction: column; }
.feed-text b { color: var(--text); font-weight: 600; }
.feed-text small { font-size: 15px; color: var(--text-3); }
.feed-xp { font-size: 17px; font-weight: 700; color: var(--gold); }
.feed-row.focused { background: var(--glass-2); }

.compare-panel { width: 1100px; align-items: center; }
.cmp-row { display: flex; align-items: center; gap: 50px; }
.cmp-col { width: 420px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.cmp-tiers { display: flex; gap: 18px; margin: 14px 0; }
.cmp-tiers > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 24px; }
.cmp-stats { color: var(--text-2); }
.cmp-vs { font-size: 64px; font-weight: 800; font-style: italic; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cmp-verdict { font-size: 30px; font-weight: 700; }

/* ================= trophies ================= */
.tr-header { position: absolute; top: 140px; left: var(--pad-x); right: var(--pad-x); height: 210px; padding: 28px 40px; display: flex; align-items: center; gap: 40px; }
.tr-level { text-align: center; }
.tr-num { font-size: 96px; font-weight: 700; line-height: 1; background: linear-gradient(180deg, #fff, #fbbf24); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tr-xp { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.tr-xp p { font-size: 19px; }
.tr-tiers { display: flex; gap: 22px; }
.tr-tier { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 26px; }
.tr-complete { text-align: center; padding-left: 30px; border-left: 1px solid var(--line); }
.tr-complete .num { font-size: 54px; font-weight: 700; }
.tr-quests { position: absolute; top: 390px; left: var(--pad-x); width: 640px; display: flex; flex-direction: column; gap: 14px; }
.streak-card { display: flex; align-items: center; gap: 22px; padding: 22px 24px; border-radius: 22px; background: linear-gradient(120deg, rgba(251, 146, 60, .18), rgba(239, 68, 68, .08)); border: 1px solid rgba(251, 146, 60, .35); }
.streak-card b { font-size: 26px; }
.streak-card p { font-size: 17px; }
.streak-flame { color: #fb923c; filter: drop-shadow(0 0 14px rgba(251, 146, 60, .9)); animation: flicker 1.6s ease-in-out infinite; }
@keyframes flicker { 50% { transform: scale(1.08) rotate(-3deg); } }
.tr-grid {
  position: absolute;
  top: 380px;
  left: 780px;
  right: var(--pad-x);
  bottom: 96px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-content: start;
  padding: 10px;
}
.trophy-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  position: relative;
  transition: transform .25s var(--spring), box-shadow .25s, background .2s;
}
.trophy-card.locked { opacity: .78; }
.tc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tc-name { font-size: 22px; font-weight: 600; }
.tc-desc { font-size: 16px; color: var(--text-2); }
.tc-date { font-size: 15px; display: flex; align-items: center; gap: 6px; }
.tc-progress { display: flex; align-items: center; gap: 12px; }
.tc-progress .bar { flex: 1; height: 7px; }
.tc-progress span { font-size: 15px; }
.tc-tier { position: absolute; top: 12px; right: 16px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.tc-tier.tier-bronze { color: var(--bronze); }
.tc-tier.tier-silver { color: var(--silver); }
.tc-tier.tier-gold { color: var(--gold); }
.tc-tier.tier-platinum { color: var(--platinum); }
.trophy-card.focused { transform: scale(1.03); background: rgba(255, 255, 255, .12); box-shadow: 0 0 0 4px #fff; opacity: 1; z-index: 1; }

/* ================= settings ================= */
.settings-list { position: absolute; top: 140px; left: var(--pad-x); width: 920px; display: flex; flex-direction: column; gap: 12px; }
.settings-list .row-title { margin: 14px 0 4px; }
.setting {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 18px 24px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--line);
  transition: transform .2s var(--spring), background .2s, color .2s;
}
.setting-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.setting-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.setting-text b { font-size: 23px; }
.setting-text small { font-size: 17px; color: var(--text-2); }
.setting .slider-track { max-width: 220px; }
.setting-val { width: 64px; text-align: right; }
.setting.focused { background: #fff; color: var(--ink); transform: scale(1.02); }
.setting.focused small, .setting.focused .dim { color: rgba(10, 11, 22, .6); }
.setting.focused .slider-track { background: rgba(10, 11, 22, .12); }
.settings-side { position: absolute; top: 140px; left: 1080px; right: var(--pad-x); display: flex; flex-direction: column; gap: 22px; }
.about { padding: 30px; display: flex; flex-direction: column; gap: 20px; }
.about-head { display: flex; align-items: center; gap: 18px; }
.about-head .brand-mark { width: 64px; height: 64px; font-size: 40px; border-radius: 18px; }
.about-rows { display: flex; flex-direction: column; gap: 8px; font-size: 19px; }
.about-rows div { display: flex; justify-content: space-between; gap: 20px; }
.about-rows span { color: var(--text-3); }
.about-rows b { font-weight: 500; text-align: right; }
.controls-help { padding: 26px 30px; }
.controls-help table { width: 100%; border-collapse: collapse; font-size: 19px; }
.controls-help td { padding: 7px 0; }
.controls-help td:last-child { text-align: right; }

/* ================= player overlays ================= */
.player { position: absolute; inset: 0; }
.player-art { position: absolute; inset: 0; }
.player-art .art { width: 100%; height: 100%; }
.player-art { animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.08) translate(-1%, -1%); } }
.player-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 4, 12, .95) 10%, rgba(3, 4, 12, .4) 55%, rgba(3, 4, 12, .2)); }
.player-ui { position: absolute; left: var(--pad-x); right: var(--pad-x); bottom: 80px; display: flex; flex-direction: column; gap: 18px; }
.player-ui.center { top: 0; bottom: 0; justify-content: center; align-items: center; text-align: center; }
.player-progress { display: flex; align-items: center; gap: 22px; font-size: 20px; color: var(--text-2); }
.player-progress .bar { flex: 1; height: 8px; }
.player-progress .bar i { transition: width 1s linear; }
.player-controls { margin-top: 6px; }
.player-note { font-size: 18px; }
.player-note b { color: var(--text-2); }
.player-ui > .hints { position: absolute; right: 0; bottom: 0; }

.setup-panel { width: 980px; }
.setup-head { display: flex; gap: 30px; align-items: center; }
.setup-head .cover { width: 300px; }
.setup-steps { margin: 0; padding-left: 30px; display: flex; flex-direction: column; gap: 14px; font-size: 22px; }
.setup-steps code { font-family: var(--font-num); font-size: 19px; padding: 3px 10px; border-radius: 8px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); }

.snake { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; }
.snake-head { width: 1104px; display: flex; align-items: flex-end; gap: 90px; }
.snake-scores { display: flex; gap: 40px; }
.snake-scores > div { display: flex; flex-direction: column; align-items: flex-start; }
.snake-scores b { font-size: 48px; line-height: 1; }
.snake canvas {
  border-radius: 24px;
  background: radial-gradient(circle at 50% 40%, hsl(var(--h1) 50% 12%), #05060f);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 80px -20px hsl(var(--h1) 90% 60% / .6);
}
.snake .hints { width: 1104px; justify-content: space-between; }
.snake-over { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3, 4, 12, .6); }
.snake-over.is-hidden { display: none; }
.snake-over-panel { padding: 50px 70px; display: flex; flex-direction: column; align-items: center; gap: 16px; background: rgba(14, 16, 34, .96); }

/* ================= browser game (EmulatorJS) ================= */
.webgame { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.webgame-screen { position: relative; flex: 1; }
.webgame-screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.webgame-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: var(--text-2);
  font-size: 24px;
  background: radial-gradient(circle at 50% 40%, hsl(var(--h1) 50% 12%), #05060f);
  pointer-events: none;
}
.webgame-bar {
  height: 96px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 40px;
  background: rgba(12, 14, 30, .96);
  border-top: 1px solid var(--line);
}
.webgame-title { display: flex; flex-direction: column; min-width: 300px; }
.webgame-title b { font-size: 24px; }
.webgame-title span { font-size: 16px; }
.webgame-keys { flex: 1; display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 17px; color: var(--text-2); }
.webgame-keys span { display: inline-flex; align-items: center; gap: 8px; }
kbd {
  font-family: var(--font-num);
  font-size: 15px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  color: var(--text);
}

/* ================= game store ================= */
.store-info { top: 150px; gap: 14px; }
.store-filters {
  position: absolute;
  top: 618px;
  left: var(--pad-x);
  right: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chip-btn.active { background: var(--accent-soft); border-color: hsl(var(--h1) 90% 70% / .6); }
.chip-btn.active.focused { background: #fff; }
.store-note {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 17px;
  background: rgba(5, 6, 15, .7);
}
.store-note .icon { color: hsl(340 90% 70%); }
.store-shelf { top: 690px; }
.store-card .card-sub, .shelf-cta .card-sub { font-size: 15px; }
.card-progress {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 168px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  overflow: hidden;
  z-index: 1;
}
.card-progress i { display: block; height: 100%; background: var(--grad); border-radius: inherit; transition: width .6s var(--ease); }
.store-card.installed .badge-corner { color: #bbf7d0; border-color: rgba(74, 222, 128, .45); }
.install-progress { display: flex; align-items: center; gap: 18px; width: 760px; height: 66px; font-size: 20px; }
.install-progress .bar { flex: 1; height: 12px; }
.install-progress .num { width: 56px; text-align: right; font-weight: 600; }
.install-progress .dim { width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.store-credit { font-size: 15px; margin-top: -4px; }

.btn.danger { background: rgba(248, 113, 113, .14); border-color: rgba(248, 113, 113, .45); color: #fecaca; }
.btn.danger.focused { background: #ef4444; color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .25), 0 14px 44px -6px rgba(239, 68, 68, .7); }
.confirm-panel { width: 980px; }
.confirm-head { display: flex; gap: 30px; align-items: center; }
.confirm-head .cover { width: 320px; }
.confirm-head p { font-size: 20px; margin-top: 8px; }

/* ================= movies (netflix style) ================= */
.nf-hero { position: absolute; top: 0; left: 0; right: 0; height: 660px; }
.nf-backdrop { position: absolute; top: 0; right: 0; width: 1500px; height: 100%; }
.nf-backdrop img, .nf-backdrop .nf-art, .nf-backdrop .nf-art .art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nf-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--bg-0) 18%, rgba(5, 6, 15, .85) 38%, rgba(5, 6, 15, .25) 70%, rgba(5, 6, 15, .1)),
    linear-gradient(0deg, var(--bg-0) 0, rgba(5, 6, 15, 0) 40%);
}
.nf-info { position: absolute; top: 140px; left: var(--pad-x); width: 880px; display: flex; flex-direction: column; gap: 12px; }
.nf-logo { max-width: 520px; max-height: 140px; object-fit: contain; object-position: left center; filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .7)); }
.nf-info .title-xl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nf-reason { display: flex; align-items: flex-start; gap: 10px; font-size: 21px; font-weight: 600; color: var(--accent); max-width: 820px; }
.nf-reason .icon { flex: none; margin-top: 3px; }
.nf-desc { font-size: 21px; max-width: 820px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nf-credits { font-size: 17px; }
.nf-actions { margin-top: 6px; }
.nf-legal { font-size: 15px; min-height: 20px; }
.icon-btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.icon-btn.on.focused { background: #fff; color: var(--ink); }
.nf-search-btn { position: absolute; top: 140px; right: var(--pad-x); z-index: 2; height: 54px; font-size: 20px; padding: 0 24px; }
.nf-rows {
  position: absolute;
  top: 650px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  padding: 0 0 200px var(--pad-x);
}
.nf-row { position: relative; }
.nf-row .row-title { margin: 6px 0 12px; font-size: 24px; }
.nf-row .shelf { margin: -14px 0 -10px calc(var(--pad-x) * -1); padding: 14px var(--pad-x) 22px; gap: 22px; }
.nf-card { width: 168px; }
.nf-card .card-label { font-size: 17px; margin-top: 8px; }
.nf-card .card-sub { font-size: 14px; }
.nf-card .badge-corner { font-size: 13px; top: 8px; left: 8px; }
.nf-skeleton {
  width: 168px;
  height: 252px;
  flex: none;
  border-radius: var(--r);
  background: linear-gradient(100deg, rgba(255, 255, 255, .05) 30%, rgba(255, 255, 255, .12) 50%, rgba(255, 255, 255, .05) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.nf-search-panel { position: absolute; inset: 60px var(--pad-x) 40px; display: flex; flex-direction: column; gap: 26px; }
.nf-search-bar { display: flex; align-items: center; gap: 18px; color: var(--accent); }
.nf-search-bar .field { flex: 1; height: 80px; font-size: 32px; }
.nf-search-results {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: grid;
  grid-template-columns: repeat(8, 168px);
  justify-content: space-between;
  gap: 26px 0;
  align-content: start;
  padding: 14px 6px;
}
.nf-search-results .empty { grid-column: 1 / -1; }

.trailer { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.trailer iframe { flex: 1; width: 100%; border: 0; }
.trailer-bar { height: 92px; flex: none; display: flex; align-items: center; gap: 18px; padding: 0 40px; background: rgba(12, 14, 30, .96); font-size: 22px; }
.trailer-bar .btn { margin-left: auto; }
.webgame-screen video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }

/* together: invites, watch party, online games */
.invite-panel { width: 560px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.invite-panel p { font-size: 20px; }
.party-overlay .overlay-scrim { background: var(--bg-0); }
.party { position: absolute; inset: 40px var(--pad-x) 40px; display: flex; gap: 32px; }
.party-stage { position: relative; flex: 1; border-radius: var(--r); overflow: hidden; background: #000; }
.party-player, .party-player video, .party-yt, .party-player iframe { width: 100%; height: 100%; display: block; border: 0; }
.party-player video { object-fit: contain; }
.party-reactions { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.party-reaction { position: absolute; bottom: 20px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--accent); font-size: 18px; font-weight: 700; animation: react-up 2.6s ease-out forwards; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }
.party-reaction .icon { filter: drop-shadow(0 6px 18px hsl(var(--h1) 90% 60% / .8)); }
@keyframes react-up { 0% { opacity: 0; transform: translateY(20px) scale(.6); } 15% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-560px) scale(1.2); } }
.party-side { width: 400px; flex: none; display: flex; flex-direction: column; gap: 16px; padding-top: 10px; }
.party-side .title-lg { line-height: 1.15; }
.party-members { display: flex; flex-direction: column; gap: 10px; font-size: 19px; }
.party-member { display: flex; align-items: center; gap: 10px; }
.party-side .btn-row { flex-wrap: wrap; }
.together-note { font-size: 16px; margin-top: 4px; }
.netplay-box { margin-top: 18px; padding: 22px 26px; border-radius: var(--r); background: rgba(0, 0, 0, .45); border: 1px solid var(--line); max-width: 900px; text-align: left; display: flex; flex-direction: column; gap: 10px; font-size: 19px; }
.netplay-addr { font-size: 30px; font-weight: 700; color: var(--accent); }

/* ================= aPi Wrapped & charts ================= */
/* Chart palette (validated with the data-viz checker on --viz-surface): series 1 blue, series 2 orange; one blue
   ramp for magnitude. Text never uses these colours. */
.screen {
  --series-1: #3987e5;
  --series-2: #d95926;
  --seq-1: #184f95;
  --seq-2: #1c5cab;
  --seq-3: #2a78d6;
  --seq-4: #5598e7;
  --seq-5: #86b6ef;
  --viz-surface: #14162a;
  --viz-empty: #1d2037;
  --viz-grid: #2a2d45;
  --viz-axis: #3c4060;
}
.viz-panel { background: var(--viz-surface); padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.viz-title { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 600; }
.viz-title .icon { color: var(--accent); }
.viz-title small { margin-left: auto; font-size: 15px; font-weight: 400; }
.viz-title .viz-legend { margin-left: auto; }
.viz { width: 100%; height: auto; display: block; overflow: visible; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-grid.base { stroke: var(--viz-axis); }
.viz-tick { fill: var(--text-3); font-size: 13px; font-family: inherit; }
.viz-cross { stroke: var(--text-3); stroke-width: 1; }
.viz-hit { cursor: default; }
.viz-empty { color: var(--text-3); font-size: 17px; padding: 18px 0; }
.viz-sub { font-size: 16px; color: var(--text-2); }
.viz-legend { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 400; color: var(--text-3); }
.viz-legend i { width: 18px; height: 10px; border-radius: 2px; }
.viz-legend span { margin: 0 6px; }
.viz-key { display: flex; gap: 22px; font-size: 16px; color: var(--text-2); }
.viz-key span { display: inline-flex; align-items: center; gap: 8px; }
.viz-key i { width: 14px; height: 14px; border-radius: 4px; }
.viz-tip { position: absolute; z-index: 30; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: #f4f3ff; color: #0b0c1d; font-size: 15px; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateY(-100%); transition: opacity .12s; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .7); }
.viz-tip.on { opacity: 1; }
.viz-bars { display: flex; flex-direction: column; gap: 10px; }
.viz-bar-row { display: grid; grid-template-columns: auto minmax(90px, 160px) 1fr auto; align-items: center; gap: 12px; font-size: 16px; }
.viz-bar-row:not(:has(.viz-thumb)) { grid-template-columns: minmax(90px, 180px) 1fr auto; }
.viz-thumb { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.viz-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.viz-bar-track, .viz-vs-track { height: 14px; display: block; }
.viz-bar-track i, .viz-vs-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); }
.viz-bar-value { color: var(--text); font-size: 16px; }
.viz-versus { display: flex; flex-direction: column; gap: 12px; }
.viz-vs-metric { display: grid; grid-template-columns: 110px 1fr; align-items: center; row-gap: 2px; }
.viz-vs-label { grid-row: span 2; color: var(--text-2); font-size: 16px; }
.viz-vs-row { display: grid; grid-template-columns: 1fr 76px; align-items: center; gap: 10px; }
.viz-vs-row b { font-size: 15px; color: var(--text); }

.stats-page { position: absolute; top: 112px; left: 0; right: 0; bottom: 0; overflow: hidden; padding: 4px var(--pad-x) 160px; }
.stats-filters { margin-bottom: 18px; }
.stats-body { display: flex; flex-direction: column; gap: 20px; position: relative; }
.stats-top { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; }
.persona-card { padding: 26px 30px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.persona { font-size: 54px; font-weight: 800; line-height: 1.05; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.persona-headline { font-size: 22px; font-weight: 600; }
.persona-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 17px; color: var(--text-2); }
.persona-facts li { display: flex; align-items: flex-start; gap: 8px; }
.persona-facts .icon { color: var(--gold); flex: none; margin-top: 3px; }
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.stat-tile { padding: 18px 20px; border-radius: var(--r); background: var(--glass); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.stat-label { display: flex; align-items: center; gap: 8px; font-size: 16px; color: var(--text-2); }
.stat-label .icon { color: var(--accent); }
.stat-value { font-size: 40px; font-weight: 700; line-height: 1; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stats-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.stats-films { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats-film { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); }
.stats-film img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; }
.challenges-panel { padding: 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.challenges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.challenge { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .04); }
.challenge-title { font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.challenge.done .challenge-title .icon { color: var(--ok); }
.meter { height: 10px; border-radius: 5px; background: var(--seq-1); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--series-1); }
.challenge.done .meter i { background: var(--ok); }
.challenge-count { font-size: 15px; color: var(--text-2); }
.stats-page .panel.focused, .stats-page .stat-tile.focused { box-shadow: 0 0 0 3px #fff; }

/* the Wrapped story */
.story-overlay .overlay-scrim { background: radial-gradient(120% 90% at 20% 10%, hsl(var(--h1) 70% 22%), var(--bg-0) 70%); }
.story { position: absolute; inset: 60px 140px; display: flex; flex-direction: column; }
.story-bars { display: flex; gap: 8px; }
.story-bars i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .18); }
.story-bars i.done { background: #fff; }
.story-bars i.now { background: linear-gradient(90deg, #fff 50%, rgba(255, 255, 255, .18) 50%); background-size: 200% 100%; animation: story-fill 6.5s linear forwards; }
@keyframes story-fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.story-slide { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 26px; animation: msg-in .5s var(--spring); }
.story-big { font-size: 96px; font-weight: 800; line-height: 1.02; margin: 0; }
.story-big.grad, .story-big .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.story-sub { font-size: 30px; color: var(--text-2); max-width: 1300px; margin: 0; }
.story-feature { display: flex; align-items: center; gap: 26px; font-size: 26px; color: var(--text-2); }
.story-feature img { width: 180px; height: 180px; border-radius: 22px; object-fit: cover; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.story-feature b { display: block; font-size: 48px; color: var(--text); }
.story-posters { display: flex; gap: 20px; }
.story-posters img { width: 170px; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
