/* K-0044 redesign, phase 1: the homepage as a living CRT desktop (assets/home.js). */
.home2 { overflow-x: clip; }
.home2 > .home-sec, .home2 > .links { max-width: var(--max); margin: var(--s-8) auto 0; padding: 0 var(--gutter); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
/* phones: a head's link (or buttons) keeps to one line and drops under the heading when they don't fit side by
   side, instead of both squeezing into 2-3 line columns ("my / stats", "can't pick? / channel / surf →") */
@media (max-width: 560px) {
  .sec-head { flex-wrap: wrap; row-gap: 2px; column-gap: var(--s-3); }
  .sec-head > :not(h2) { white-space: nowrap; }
  .sec-head > a.text-link, .desk-row-acts button { padding-block: 6px; }
}

/* ---------- the desktop ---------- */
.desk {
  --desk-h: min(860px, calc(100svh - var(--topbar-h, 56px)));
  position: relative; isolation: isolate; height: var(--desk-h); min-height: 620px; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 70% 40%, #1a2410 0%, transparent 60%),
    radial-gradient(900px 500px at 10% 90%, #12161f 0%, transparent 60%),
    linear-gradient(#0d0f0c, #0a0b0d);
  border-bottom: 1px solid var(--line);
}
/* faint pixel grid, like a desktop pattern */
.desk::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(rgb(var(--phosphor) / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(var(--phosphor) / .05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at 60% 45%, #000 30%, transparent 80%);
}
.desk-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.desk-glow { position: absolute; width: 520px; height: 520px; right: 8%; top: 12%; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgb(var(--phosphor) / .16), transparent 65%); filter: blur(10px); pointer-events: none; }
.desk-scan { position: absolute; inset: 0; z-index: 6; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); mix-blend-mode: overlay; }
.desk::after { content: ""; position: absolute; inset: 0; z-index: 6; pointer-events: none; box-shadow: inset 0 0 160px 40px rgba(0, 0, 0, .55); }

/* a window */
.desk-win { position: absolute; z-index: 3; background: rgba(23, 24, 28, .92); border: 2px solid #3a3f2a; border-radius: 10px; box-shadow: 0 0 0 1px #000, 8px 8px 0 rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.win-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); height: 30px; padding: 0 var(--s-3); border-bottom: 2px solid #3a3f2a; background: linear-gradient(90deg, #26301a, #1b1e16); border-radius: 8px 8px 0 0; font: 800 12px var(--mono); color: var(--accent); letter-spacing: .02em; }
.win-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-dots { display: flex; gap: 6px; }
.win-dots i { width: 12px; height: 12px; border: 2px solid #3a3f2a; border-radius: 3px; background: #0e0f11; }
.win-dots i:last-child { background: var(--alarm); border-color: #6d2620; }
.win-body { padding: var(--s-5) var(--s-6) var(--s-6); }

.desk-hello { left: max(var(--gutter), calc(50% - 600px)); top: 56px; width: min(600px, calc(100% - 2 * var(--gutter))); }
.desk-prompt { margin: 0 0 var(--s-3); font: 700 var(--fs-14) var(--mono); color: var(--text-dim); }
.desk-prompt span { color: var(--accent); }
.caret { margin-left: 2px; color: var(--accent); }
.desk-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.01em; text-wrap: balance; }
.desk-title span { color: var(--accent); text-shadow: 0 0 24px rgb(var(--phosphor) / .35); }
.desk-sub { margin: var(--s-4) 0 0; max-width: 44ch; color: var(--text-dim); font-size: var(--fs-16); line-height: 1.5; }
.desk-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-5) 0 0; }
.desk-ctas .play-btn { box-shadow: 4px 4px 0 #000; transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) var(--ease-out); }
.desk-ctas .play-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.desk-ctas .play-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }

/* the computer */
.desk-pc { position: absolute; z-index: 4; right: max(var(--gutter), calc(50% - 600px)); top: calc(50% - 86px); transform: translateY(-50%); width: min(clamp(220px, 26vw, 330px), calc((100svh - 270px) * .66)); }
.desk-mascot { position: relative; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)); }
.desk-mascot img, .desk-mascot svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.desk-shadow { height: 18px; margin: -6px auto 0; width: 70%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .6), transparent); }
.desk-bubble {
  position: absolute; z-index: 2; left: 0; top: 0; transform: translate(-35%, -70%); max-width: 210px; padding: 10px 12px;
  background: var(--text); color: var(--bg); border: 2px solid #000; border-radius: 10px; box-shadow: 4px 4px 0 #000;
  font: 800 13px/1.3 var(--mono); opacity: 0; translate: 0 6px; transition: opacity .2s, translate .2s var(--ease-out); pointer-events: none;
}
.desk-bubble.on { opacity: 1; translate: 0 0; }
.desk-bubble::after { content: ""; position: absolute; right: 24px; bottom: -16px; border: 8px solid transparent; border-top-color: var(--text); }

/* the quick-launch dock: every game icon in one tidy row above the taskbar (it used to be loose icons scattered round
   the welcome window). home.js swells the icons near the pointer and runs "surprise me". */
.desk-dock { position: absolute; z-index: 4; left: max(var(--gutter), calc(50% - 600px)); right: max(var(--gutter), calc(50% - 600px)); bottom: 58px; padding: 10px 10px 8px; background: rgba(23, 24, 28, .88); border: 2px solid #3a3f2a; border-radius: 0 12px 12px 12px; box-shadow: 0 0 0 1px #000, 6px 6px 0 rgba(0, 0, 0, .55); backdrop-filter: blur(6px); }
.dock-tab { position: absolute; left: -2px; bottom: 100%; margin: 0; height: 24px; padding: 0 12px; display: flex; align-items: center; border: 2px solid #3a3f2a; border-bottom: 0; border-radius: 8px 8px 0 0; background: linear-gradient(90deg, #26301a, #1b1e16); font: 800 11px var(--mono); color: var(--accent); letter-spacing: .02em; white-space: nowrap; }
.dock-row { display: flex; align-items: flex-end; gap: 2px; }
.desk-icons { display: contents; margin: 0; padding: 0; list-style: none; }
.desk-icons li, .desk-dice { flex: 1 1 0; min-width: 0; list-style: none; }
.desk-icon { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 4px 4px 2px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; user-select: none; -webkit-user-drag: none; }
.desk-icon .ico { display: block; width: min(84px, 100%); aspect-ratio: 3 / 2; overflow: hidden; border: 2px solid #000; border-radius: 6px; box-shadow: 3px 3px 0 #000; background: var(--surface); transform-origin: 50% 100%; transform: scale(var(--mag, 1)); transition: transform .14s var(--ease-out), box-shadow .14s var(--ease-out); }
.desk-icon img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; pointer-events: none; }
.desk-icon .lbl { max-width: 100%; padding: 1px 5px; border-radius: 3px; font: 700 12px/1.25 var(--mono); text-align: center; text-shadow: 0 1px 0 #000, 0 0 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-icon:hover .ico, .desk-icon:focus-visible .ico { --mag: 1.2; box-shadow: 4px 5px 0 #000; }
.desk-icon:hover .lbl, .desk-icon:focus-visible .lbl, .desk-icon.is-picked .lbl { background: var(--accent); color: var(--on-accent); text-shadow: none; }
.desk-icon:focus-visible { outline: 2px dashed var(--accent); outline-offset: 2px; }
.desk-icon.is-picked .ico { --mag: 1.28; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 4px 6px 0 #000; }
.desk-icon.is-won .ico { animation: dock-won .5s steps(4) 2; }
@keyframes dock-won { 50% { box-shadow: 0 0 0 5px var(--accent), 0 0 30px 6px rgb(var(--phosphor) / .6); } }
/* surprise me: the last tile, a dice that spins the dock */
.desk-dice { margin-left: 6px; padding-left: 10px; border-left: 2px dashed #3a3f2a; border-radius: 0 8px 8px 0; }
.desk-dice .ico { display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.desk-dice .ico b { font: 800 30px/1 var(--pixel, var(--mono)); }
.desk.is-spinning .desk-dice .ico b { animation: dice-roll .32s steps(4) infinite; }
@keyframes dice-roll { to { transform: rotate(360deg); } }
/* short screens: the dock drops its labels so the welcome window keeps its room */
@media (min-width: 900px) and (max-height: 760px) { .desk-dock .lbl, .dock-tab { display: none; } .desk-dock { padding-bottom: 10px; border-radius: 12px; } }

/* hover preview window: the game's clip */
.desk-peek { position: absolute; z-index: 5; width: 260px; pointer-events: none; opacity: 0; transform: translateY(6px) scale(.97); transition: opacity .15s, transform .15s var(--ease-out); }
.desk-peek.on { opacity: 1; transform: none; }
.desk-peek .win-body { padding: 0; }
.desk-peek video, .desk-peek img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #000; image-rendering: pixelated; }
.desk-peek .peek-still { animation: peek-pan 6s ease-in-out infinite alternate; transform-origin: 30% 50%; }
.desk-peek .win-body { overflow: hidden; }
@keyframes peek-pan { from { transform: scale(1.04); } to { transform: scale(1.18) translateX(-4%); } }
.desk-peek p { margin: 0; padding: 8px 10px 10px; font-size: var(--fs-14); color: var(--text-dim); line-height: 1.35; }

/* taskbar */
.desk-bar { position: absolute; z-index: 7; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--s-2); height: 40px; padding: 0 var(--s-3); background: rgba(14, 15, 17, .92); border-top: 2px solid #3a3f2a; font: 700 12px var(--mono); color: var(--text-dim); }
.desk-start { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 2px solid #000; border-radius: 5px; background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; box-shadow: 2px 2px 0 #000; cursor: pointer; }
.desk-start[aria-expanded="true"] { transform: translate(2px, 2px); box-shadow: none; }
.desk-start:focus-visible { outline: 2px dashed var(--text); outline-offset: 2px; }
/* the start menu */
.desk-menu { position: absolute; z-index: 7; left: var(--s-3); bottom: 46px; display: flex; width: min(270px, calc(100% - 2 * var(--s-3))); background: #17181c; border: 2px solid #3a3f2a; border-radius: 10px 10px 10px 0; box-shadow: 0 0 0 1px #000, 8px 8px 0 rgba(0, 0, 0, .6); overflow: hidden; }
.desk-menu[hidden] { display: none; }
.menu-side { margin: 0; padding: 10px 5px; writing-mode: vertical-rl; transform: rotate(180deg); background: linear-gradient(#26301a, #3d5212); font: 800 13px var(--mono); color: var(--accent); letter-spacing: .08em; text-align: left; }
.menu-side b { margin-top: 6px; color: var(--text); }
.desk-menu ul { flex: 1; margin: 0; padding: 6px; list-style: none; }
.desk-menu a, .desk-menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--text); font: 700 14px var(--mono); text-align: left; text-decoration: none; cursor: pointer; }
.desk-menu i { flex: none; width: 20px; font-style: normal; text-align: center; color: var(--accent); }
.desk-menu a:hover, .desk-menu button:hover, .desk-menu a:focus-visible, .desk-menu button:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.desk-menu a:hover i, .desk-menu button:hover i, .desk-menu a:focus-visible i, .desk-menu button:focus-visible i { color: inherit; }
.menu-sep { margin-top: 6px; padding-top: 6px; border-top: 2px solid #2a2d34; }
/* "shut down…": the screen folds to a line, then the computer refuses */
.desk-off { position: absolute; inset: 0; z-index: 9; background: #000; pointer-events: none; }
.desk-off::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 100%; background: #dfe8cf; transform: translateY(-50%) scaleY(1); animation: crt-off 1.5s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes crt-off { 0% { transform: translateY(-50%) scaleY(1); opacity: .25; } 28% { transform: translateY(-50%) scaleY(.004); opacity: 1; } 55% { transform: translateY(-50%) scale(.002, .004); opacity: 1; } 70% { transform: translateY(-50%) scale(.002, .004); opacity: 0; } 100% { transform: translateY(-50%) scaleY(1); opacity: 0; } }
.desk-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.desk-chip b { color: var(--text); }
.cpu-meter { display: inline-block; width: 46px; height: 8px; border: 1px solid #000; background: #0e0f11; }
.cpu-meter i { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--accent), #ffd84d 70%, var(--alarm)); background-size: 46px 100%; transition: width .3s; }
.desk-clock { margin-left: auto; color: var(--text); }
.desk.is-hot .desk-chip:first-of-type { border-color: var(--alarm); color: var(--alarm); animation: desk-blink .4s steps(2) infinite; }
@keyframes desk-blink { 50% { opacity: .5; } }

/* "happening now": the weekly challenge, today's dailies and the week's chart, under the desktop */
/* pick a mood: five tiles to the filtered hub. The cover strip keeps its height with or without covers (no layout shift). */
.mood-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s-3); }
.mood[hidden] { display: none; }
.mood { --mood: var(--accent); position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: var(--s-4); border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; overflow: hidden; transition: transform .16s var(--ease-out), border-color .16s, box-shadow .16s; }
.mood::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--mood); }
.mood:hover, .mood:focus-visible { transform: translate(-2px, -2px); border-color: var(--mood); box-shadow: 4px 4px 0 #000; outline: none; }
.mood-quick { --mood: #ffd84a; } .mood-arcade { --mood: #b8f23a; } .mood-puzzle { --mood: #7ad7ff; } .mood-chill { --mood: #c9a8ff; } .mood-rage { --mood: #ff8a7a; }
.mood-art { display: flex; height: 42px; margin-bottom: 8px; }
.mood-art img { flex: none; width: 64px; height: 40px; object-fit: cover; border: 2px solid #000; border-radius: 4px; background: var(--bg); image-rendering: pixelated; box-shadow: 2px 2px 0 #000; transition: transform .18s var(--ease-out); }
.mood-art img + img { margin-left: -18px; }
.mood:hover .mood-art img:nth-child(1), .mood:focus-visible .mood-art img:nth-child(1) { transform: rotate(-6deg) translateY(-2px); }
.mood:hover .mood-art img:nth-child(3), .mood:focus-visible .mood-art img:nth-child(3) { transform: rotate(6deg) translateY(-2px); }
.mood-name { font: 800 var(--fs-18, 18px)/1.2 var(--sans, inherit); color: var(--mood); }
.mood-line { color: var(--text-dim); font-size: var(--fs-14, 14px); line-height: 1.35; }
.mood-n { margin-top: auto; padding-top: 6px; font: 700 12px var(--mono); color: var(--text); white-space: nowrap; }
@media (max-width: 1023px) { .mood-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mood:nth-child(n+4) { grid-column: span 1; } }
@media (max-width: 639px) { .mood-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mood:first-child { grid-column: 1 / -1; } .mood-art img { width: 54px; height: 34px; } .mood-art img + img { margin-left: -20px; } }
@media (prefers-reduced-motion: reduce) { .mood, .mood-art img { transition: none; } .mood:hover, .mood:focus-visible, .mood:hover .mood-art img, .mood:focus-visible .mood-art img { transform: none; } }
.now-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: var(--s-4); }
.now-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: var(--s-4); border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; }
.now-card[hidden] { display: none; }
/* latest crowns: the three newest #1 scores, under the cards (filled on the server, hidden when there are none) */
.now-crowns { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin-top: var(--s-4); }
.now-crowns[hidden] { display: none; }
.crown-row { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0; padding: 0; list-style: none; min-width: 0; }
.crown-row li { min-width: 0; max-width: 100%; }
.crown-chip { display: block; max-width: 100%; padding: 6px var(--s-3); border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text-dim); font-size: var(--fs-12); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: border-color .16s, color .16s; }
.crown-chip b { color: var(--text); font-weight: 600; }
.crown-chip .num { color: #ffcf40; font-weight: 700; }
.crown-ico { color: #ffcf40; }
.crown-chip:hover, .crown-chip:focus-visible { border-color: rgb(255 207 64 / .6); color: var(--text); }
@media (prefers-reduced-motion: reduce) { .crown-chip { transition: none; } }
a.now-card { transition: transform .16s var(--ease-out), border-color .16s, box-shadow .16s; }
a.now-card:hover, a.now-card:focus-visible { transform: translate(-2px, -2px); border-color: var(--accent); box-shadow: 4px 4px 0 #000; outline: none; }
.now-tag { font: 800 12px var(--mono); color: var(--accent); letter-spacing: .04em; text-transform: uppercase; }
.now-tag b { margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--accent); color: var(--on-accent); }
.now-title { max-width: 26ch; font: 800 var(--fs-18, 18px)/1.25 var(--sans, inherit); text-wrap: balance; }
.now-meta { color: var(--text-dim); font-size: var(--fs-14, 14px); }
.now-count { margin-top: auto; padding-top: 6px; font: 700 12px var(--mono); color: var(--text-dim); }
.now-count b { color: var(--text); }
.now-thumb { position: absolute; top: var(--s-4); right: var(--s-4); width: 72px; height: 45px; object-fit: cover; border: 2px solid #000; border-radius: 6px; box-shadow: 3px 3px 0 #000; image-rendering: pixelated; }
.now-ch .now-tag, .now-ch .now-title { max-width: calc(100% - 88px); }
.now-dots { position: absolute; top: var(--s-4); right: var(--s-4); display: flex; gap: 6px; }
.now-dots i { width: 14px; height: 14px; border: 2px solid var(--line); border-radius: 4px; background: var(--bg); }
.now-dots i.on { border-color: #000; background: var(--accent); box-shadow: 0 0 10px rgb(var(--phosphor) / .5); }
.now-chart { width: 100%; margin: 4px 0 0; padding: 0; list-style: none; }
.now-chart a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px; border-radius: 6px; color: var(--text); text-decoration: none; }
.now-chart a:hover, .now-chart a:focus-visible { background: var(--accent); color: var(--on-accent); outline: none; }
.now-chart .rank { flex: none; width: 18px; font: 800 15px var(--mono); color: var(--accent); text-align: center; }
.now-chart li:first-child .rank { font-size: 19px; }
.now-chart a:hover .rank, .now-chart a:focus-visible .rank, .now-chart a:hover .mv, .now-chart a:focus-visible .mv { color: inherit; }
.now-chart img { flex: none; width: 48px; height: 30px; object-fit: cover; border: 2px solid #000; border-radius: 4px; image-rendering: pixelated; }
.now-chart .nm { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-chart .mv { flex: none; font: 800 11px var(--mono); color: var(--text-dim); }
.now-chart .mv-up, .now-chart .mv-new { color: var(--accent); }
.now-chart .mv-down { color: #ff8a7a; }

/* phones and narrow screens: everything stacks, the dock becomes a row you swipe */
@media (max-width: 899px) {
  .desk { height: auto; min-height: 0; padding: var(--s-5) var(--gutter) 64px; display: grid; gap: var(--s-5); grid-template-columns: minmax(0, 1fr); }
  .desk-hello { position: relative; left: auto; top: auto; width: auto; order: 2; }
  .win-body { padding: var(--s-4) var(--s-4) var(--s-5); }
  .desk-pc { position: relative; right: auto; top: auto; transform: none; order: 1; width: 150px; margin: 0 auto; }
  .desk-bubble { left: auto; right: -6px; top: 30%; transform: translate(100%, -50%); width: 104px; padding: 7px 8px; font-size: 11px; }
  .desk-bubble::after { right: auto; bottom: auto; top: 50%; left: -16px; margin-top: -8px; border-top-color: transparent; border-right-color: var(--text); }
  /* phones: the dock is one row you swipe sideways */
  .desk-dock { position: relative; left: auto; right: auto; bottom: auto; order: 3; margin-top: 24px; padding: 10px 0 6px; }
  .dock-row { align-items: flex-start; gap: 4px; padding: 0 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none; }
  .dock-row::-webkit-scrollbar { display: none; }
  .desk-icons li, .desk-dice { flex: 0 0 96px; scroll-snap-align: start; }
  .desk-dice { margin-left: 2px; padding-left: 8px; }
  .desk-menu { bottom: 50px; }
  .desk-glow { right: -30%; top: -10%; }
  .desk-peek { display: none; }
}
@media (max-width: 420px) { .desk-pc { width: 128px; } .desk-chip.desk-cooked { display: none; } }

/* ---------- game shelf: cards that play their clip on hover ---------- */
.shelf2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s-4); margin: 0; padding: 0; list-style: none; }
.card2 { position: relative; display: block; border: 2px solid var(--line); border-radius: var(--r-md); background: var(--surface); color: var(--text); text-decoration: none; overflow: hidden;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); transition: transform .2s var(--ease-out), border-color .2s, box-shadow .2s; }
.card2:hover, .card2:focus-visible { --lift: -4px; border-color: var(--accent); box-shadow: 6px 8px 0 #000, 0 0 0 1px var(--accent); }
.card2:focus-visible { outline: none; }
/* K-0050 item 4: a card with its game's colour (style="--accent") wears a stripe of it under the shot */
.card2[style] .thumb::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); }
.card2 .thumb { position: relative; display: block; aspect-ratio: 16 / 10; background: #000; overflow: hidden; }
.card2 .thumb img, .card2 .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
/* gameplay posters (src/pages.js art(): class is-poster, 320x180 frames of the clip) and the clip itself scale smoothly,
   like the hub's .game-thumb.is-poster (games/games.css); the pixel-art covers stay pixelated */
.card2 .thumb img.is-poster, .card2 .thumb img[src*="/posters/"], .card2 .thumb video { image-rendering: auto; }
.card2 .thumb video { opacity: 0; transition: opacity .2s; } /* the server's placeholder <video>; assets/preview.js plays its own */
.card2 .thumb::after { content: "▶ play"; position: absolute; right: 8px; bottom: 8px; padding: 3px 8px; border: 2px solid #000; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 800 12px var(--mono); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.card2:hover .thumb::after, .card2:focus-visible .thumb::after { opacity: 1; transform: none; }
.card2 .meta { display: block; padding: var(--s-3) var(--s-3) var(--s-4); }
.card2 b { display: block; font-family: var(--display); font-size: var(--fs-20); line-height: 1.1; }
.card2 small { display: block; margin-top: 4px; color: var(--text-dim); font-size: var(--fs-14); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card2 .tag-new { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 2px 7px; border: 2px solid #000; border-radius: 4px; background: var(--accent); color: var(--on-accent); font: 800 11px var(--mono); }
/* phones: two compact columns (this must sit after the base .shelf2 rule, or the base rule wins) */
@media (max-width: 599px) { .shelf2 { grid-template-columns: 1fr 1fr; gap: var(--s-3); } .card2 small { display: none; } .card2 b { font-size: var(--fs-16); } }

/* ---------- K-0064: "your desk", returning players only (assets/home.js) ----------
   html.cc-desk is set in <head> when this device has play history: the row shows and holds its height from the first
   paint, so filling it moves nothing. The strip swipes sideways on its own; the page never does. */
html.cc-desk .desk-row[hidden] { display: block; }
/* K-0068: land below the fixed top bar (desktop); phones have the bar at the bottom */
.desk-row { scroll-margin-top: calc(var(--topbar-h) + var(--s-5)); }
@media (max-width: 767px) { .desk-row { scroll-margin-top: var(--s-5); } }
/* K-0071: on phones the hero stacks and its three desktop icons push "your desk" a screen down; a returning player's
   own row is the better list, so it takes their place right under the welcome window */
@media (max-width: 899px) { html.cc-desk .desk-dock { display: none; } }
/* K-0066: the nudge in the hero window, returning players only; the hero window is positioned, so the page doesn't move */
.desk-nudge-p { display: none; margin: var(--s-4) 0 0; }
html.cc-desk .desk-nudge-p { display: block; }
.desk-nudge { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 4px 12px 4px 8px; border: 1px dashed var(--accent);
  border-radius: 999px; color: var(--accent); font: 700 var(--fs-14) var(--mono); text-decoration: none; }
.desk-nudge img { width: 14px; height: 20px; image-rendering: pixelated; }
.desk-nudge:hover, .desk-nudge:focus-visible { border-style: solid; background: rgb(var(--phosphor) / .08); }
@media (prefers-reduced-motion: no-preference) {
  .desk-nudge img { animation: desk-bob 2.4s ease-in-out infinite; }
  .desk-nudge span { display: inline-block; animation: desk-nudge-dip 1.6s ease-in-out infinite; }
  @keyframes desk-nudge-dip { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
}
.desk-row .section-label span { color: var(--text-dim); font: 700 var(--fs-14) var(--mono); letter-spacing: 0; white-space: nowrap; }
.desk-clear { padding: 4px 0; border: 0; background: none; font: inherit; font-size: var(--fs-14); cursor: pointer; }
.desk-row-in { display: flex; align-items: flex-start; gap: var(--s-3); }
.desk-row-pc { flex: none; display: flex; flex-direction: column; align-items: center; gap: var(--s-2); width: 96px; margin: 0; padding-top: var(--s-2); text-align: center; }
.desk-row-pc img { width: 46px; height: 66px; image-rendering: pixelated; transform-origin: 50% 100%; }
.desk-row-say { position: relative; padding: 6px 8px; border: 2px solid var(--text); border-radius: 8px; background: var(--surface); color: var(--text); font: 700 12px/1.3 var(--mono); }
.desk-row-say:empty { display: none; }
.desk-row-say::before { content: ""; position: absolute; left: 50%; top: -9px; margin-left: -7px; border: 7px solid transparent; border-top: 0; border-bottom-color: var(--text); }
.desk-strip { flex: 1; min-width: 0; min-height: 344px; display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: var(--s-4); margin: 0; padding: 6px 12px 14px 2px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-left: 2px; scrollbar-width: thin; }
.desk-strip > li { scroll-snap-align: start; }
.desk-strip .card2 { height: 100%; }
.desk-strip .is-resume { border-color: var(--accent); }
.desk-stk { position: absolute; left: 8px; top: 8px; z-index: 2; padding: 2px 7px; border: 2px solid #000; border-radius: 4px; background: #f2ead7; color: #000; font: 800 11px var(--mono); transform: rotate(-3deg); box-shadow: 2px 2px 0 #000; }
.desk-stk.is-new { background: #c6ff3d; }
.desk-stk.is-hot { background: #ffd678; }
.desk-go { display: inline-block; margin-top: var(--s-2); padding: 6px 10px; border: 2px solid #000; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 800 13px/1.2 var(--mono); box-shadow: 3px 3px 0 #000; }
@media (max-width: 599px) {
  .desk-row-in { display: block; }
  .desk-row-pc { flex-direction: row; width: auto; padding: 0 0 var(--s-2); text-align: left; }
  .desk-row-pc img { width: 28px; height: 40px; }
  .desk-row-say::before { left: -9px; top: 50%; margin: -7px 0 0; border: 7px solid transparent; border-left: 0; border-right-color: var(--text); }
  .desk-strip { grid-auto-columns: 44%; gap: var(--s-3); min-height: 245px; }
  .desk-strip .card2 small { display: none; }
  .desk-strip .card2 b { font-size: var(--fs-16); }
  .desk-go { font-size: 12px; }
}
@media (prefers-reduced-motion: no-preference) {
  .desk-row-pc img { animation: desk-pop .55s cubic-bezier(.3, 1.6, .5, 1) .15s both, desk-bob 2.6s ease-in-out .8s infinite; }
  .desk-row-say { animation: desk-say .3s var(--ease-out) .55s both; }
}
@keyframes desk-pop { from { transform: translateX(-24px) scale(.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes desk-bob { 0%, 100% { transform: none; } 50% { transform: translateY(-3px) rotate(2deg); } }
@keyframes desk-say { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* page transitions between our pages (browsers that support them) */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .desk-icon .ico, .card2, .desk-bubble, .desk-peek, a.now-card { transition: none; }
  .desk-icon.is-won .ico, .desk.is-spinning .desk-dice .ico b, .desk-off::before { animation: none; }
  .caret { animation: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .caret { animation: desk-caret 1s steps(2) infinite; }
  @keyframes desk-caret { 50% { opacity: 0; } }
}

/* ---------- first-visit boot (assets/boot.js) ----------
   A POST screen types out, then the tube powers on: the black glass collapses to a bright line and the desk is there. */
.cc-post {
  position: fixed;
  inset: 0;
  z-index: 2147483641;
  display: flex;
  align-items: flex-start;
  padding: max(10vh, 48px) max(6vw, 20px);
  background:
    radial-gradient(120% 90% at 50% 45%, rgb(var(--phosphor) / .06), transparent 60%),
    repeating-linear-gradient(to bottom, rgb(255 255 255 / .03) 0 1px, transparent 1px 3px),
    #050605;
  color: var(--accent);
  font: 800 clamp(13px, 1.8vw, 22px)/1.75 var(--mono);
  text-shadow: 0 0 8px rgb(var(--phosphor) / .55);
  transform-origin: 50% 50%;
}
.cc-post p { display: flex; gap: 1ch; max-width: 46ch; margin: 0; white-space: pre; }
.cc-post p:first-child { margin-bottom: 1.2em; color: var(--beige); text-shadow: 0 0 8px rgb(232 217 181 / .4); }
.cc-post b { margin-left: auto; font-weight: 800; }
.cc-post b.alarm { color: var(--alarm); text-shadow: 0 0 8px rgb(255 90 78 / .6); }
.cc-post i { font-style: normal; animation: desk-caret .6s steps(2) infinite; }
.cc-post.off { animation: cc-post-off .4s cubic-bezier(.6, 0, .9, .4) forwards; }
@keyframes cc-post-off {
  0% { transform: none; filter: none; }
  45% { transform: scaleY(.006) scaleX(1); filter: brightness(5); background: #e9ffc0; }
  100% { transform: scaleY(.004) scaleX(0); filter: brightness(5); opacity: 0; }
}
@media (max-width: 480px) { .cc-post p { max-width: none; } }

/* ---------- the hero reel: a game playing on a little screen in the welcome window (assets/home.js flips the clips) ---------- */
.desk-reel { --reel-accent: var(--accent); display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s-3); align-items: center; margin: var(--s-4) 0 0; color: var(--text); text-decoration: none; }
.reel-screen { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border: 2px solid #3a3f2a; border-radius: 8px; background: #07080a; box-shadow: 4px 4px 0 #000;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.reel-screen img, .reel-screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-screen video { opacity: 0; transition: opacity .25s ease; }
.reel-screen video.is-on { opacity: 1; }
.reel-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0) 0 2px, rgb(0 0 0 / .16) 2px 3px); }
.reel-bar { position: absolute; z-index: 1; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--reel-accent); transform: scaleX(0); transform-origin: left; }
.desk-reel.is-rolling .reel-bar { animation: reel-bar 4.5s linear forwards; }
@keyframes reel-bar { to { transform: scaleX(1); } }
.desk-reel:hover .reel-screen, .desk-reel:focus-visible .reel-screen { border-color: var(--reel-accent); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 #000; }
.reel-cap { display: grid; gap: 2px; min-width: 0; }
.reel-tag { font: 800 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--reel-accent); }
.reel-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #ff5a4f; }
.reel-title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--display); font-size: var(--fs-16); line-height: 1.25; }
.reel-pitch { display: -webkit-box; overflow: hidden; min-height: 2.8em; /* always two lines tall, so a shorter pitch on the next game never moves the page */ font-size: var(--fs-12); line-height: 1.4; color: var(--text-dim); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
@media (min-width: 900px) {
  /* beside the buttons, so the window barely grows */
  .desk-hello .win-body { display: grid; grid-template-columns: minmax(0, 1fr) 168px; column-gap: var(--s-4); }
  .desk-hello .win-body > * { grid-column: 1 / -1; }
  .desk-hello .win-body > .desk-ctas, .desk-hello .win-body > .desk-nudge-p { grid-column: 1; align-self: start; }
  .desk-hello .win-body > .desk-reel { display: block; grid-column: 2; grid-row: 4 / span 2; align-self: start; margin-top: var(--s-5); }
  .desk-reel .reel-cap { margin-top: 8px; }
  .desk-reel .reel-pitch { display: none; }
}
@media (min-width: 1320px) {
  /* room for a bigger screen: it sits beside the headline */
  .desk-hello { width: 840px; }
  .desk-hello .win-body { grid-template-columns: minmax(0, 1fr) 248px; column-gap: var(--s-5); }
  .desk-hello .win-body > * { grid-column: 1; }
  .desk-hello .win-body > .desk-reel { grid-row: 2 / span 4; margin-top: 0; }
  .desk-reel .reel-pitch { display: -webkit-box; }
}
@media (prefers-reduced-motion: reduce) {
  .reel-screen, .reel-screen video { transition: none; }
  .desk-reel:hover .reel-screen, .desk-reel:focus-visible .reel-screen { transform: none; }
}

/* ---------- "play it here": the reel's game in a window on the desktop (big screens; assets/home.js) ---------- */
.reel-here { display: none; font: 700 11px var(--mono); color: var(--text-dim); }
html.cc-playhere .reel-here { display: block; }
html.cc-playhere .desk-reel:hover .reel-here, html.cc-playhere .desk-reel:focus-visible .reel-here { color: var(--text); }
.play-win { width: min(94vw, 980px); max-width: none; max-height: none; padding: 0; overflow: visible; border: 2px solid #3a3f2a; border-radius: 10px; background: #0b0c0e; color: var(--text);
  box-shadow: 0 0 0 1px #000, 10px 10px 0 rgb(0 0 0 / .6); }
.play-win::backdrop { background: rgb(5 6 5 / .72); backdrop-filter: blur(3px); }
.play-win[open] { animation: play-win-in .22s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes play-win-in { from { opacity: 0; transform: scale(.9) translateY(18px); } }
.play-win .win-bar { height: 36px; }
.play-win-tools { display: flex; align-items: center; gap: var(--s-3); }
.play-win-full { font: 700 12px var(--mono); color: var(--text-dim); text-decoration: none; }
.play-win-full:hover, .play-win-full:focus-visible { color: var(--accent); }
.play-win-x { width: 26px; height: 22px; padding: 0; border: 2px solid #6d2620; border-radius: 4px; background: var(--alarm); color: #0b0c0e; font: 800 12px/1 var(--mono); cursor: pointer; }
.play-win-x:hover, .play-win-x:focus-visible { filter: brightness(1.2); }
.play-win-stage { position: relative; height: min(76vh, 640px); border-radius: 0 0 8px 8px; overflow: hidden; background: #07080a; }
.play-win-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-win-load { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 700 var(--fs-14) var(--mono); color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .play-win[open] { animation: none; } }

/* ---------- the screensaver: a game cover bounces around a dark screen after a minute idle (assets/home.js) ---------- */
.saver { position: fixed; inset: 0; z-index: 2147483000; overflow: hidden; background: rgb(4 5 4 / .95); cursor: pointer; animation: saver-in .6s ease; outline: 0; }
@keyframes saver-in { from { opacity: 0; } }
.saver-tile { --saver-accent: var(--accent); position: absolute; left: 0; top: 0; display: block; width: min(46vw, 240px); border: 2px solid var(--saver-accent); border-radius: 10px; overflow: hidden;
  background: #0b0c0e; color: var(--text); text-decoration: none; box-shadow: 0 0 34px -6px var(--saver-accent); will-change: transform; }
.saver-tile img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.saver-tile b { display: block; padding: 6px 10px 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--display); font-size: var(--fs-16); }
.saver-tile span { display: block; padding: 0 10px 8px; font: 800 12px var(--mono); color: var(--saver-accent); }
.saver-tile:hover, .saver-tile:focus-visible { filter: brightness(1.15); }
.saver-hint { position: absolute; left: 0; right: 0; bottom: var(--s-4); margin: 0; padding: 0 var(--s-4); text-align: center; font: 700 12px var(--mono); color: var(--text-dim); pointer-events: none; }
.saver-hint b { color: var(--accent); }
.saver.is-corner { animation: saver-corner .7s ease; }
@keyframes saver-corner { 30% { background: rgb(60 70 20 / .95); } }

/* ---------- wallpapers (html[data-wall], set by assets/home.js) and the desktop right-click menu ---------- */
html[data-wall="sunset"] .desk { background:
  radial-gradient(900px 420px at 72% 108%, #ff7a3d 0%, #b8324a 34%, transparent 68%),
  radial-gradient(900px 500px at 12% 0%, #2a1740 0%, transparent 62%),
  linear-gradient(#140d1f, #2a1024 62%, #3a1420); }
html[data-wall="sea"] .desk { background:
  radial-gradient(1100px 520px at 68% -6%, #14506a 0%, transparent 62%),
  radial-gradient(800px 480px at 8% 96%, #0f2a4a 0%, transparent 62%),
  linear-gradient(#071a26, #050d18); }
html[data-wall="hills"] .desk { background:
  radial-gradient(64% 62% at 24% 108%, #2c5a1c 0 62%, transparent 62.4%),
  radial-gradient(84% 72% at 82% 116%, #1f4416 0 62%, transparent 62.4%),
  radial-gradient(5px 5px at 16% 18%, #fff 40%, transparent 60%), radial-gradient(3px 3px at 38% 9%, #fff 40%, transparent 60%),
  radial-gradient(4px 4px at 58% 22%, #fff 40%, transparent 60%), radial-gradient(3px 3px at 86% 12%, #fff 40%, transparent 60%),
  linear-gradient(#0a1230, #14285a 70%, #1c3a6a); }
html[data-wall="sunset"] .desk::before { background-image: linear-gradient(rgba(255, 160, 90, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 160, 90, .06) 1px, transparent 1px); }
html[data-wall="sea"] .desk::before { background-image: linear-gradient(rgba(90, 210, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(90, 210, 255, .06) 1px, transparent 1px); }
html[data-wall="hills"] .desk::before { display: none; }
html[data-wall="sunset"] .desk-glow { background: radial-gradient(circle, rgba(255, 150, 90, .18), transparent 65%); }
html[data-wall="sea"] .desk-glow { background: radial-gradient(circle, rgba(90, 210, 255, .16), transparent 65%); }
html[data-wall="hills"] .desk-glow { background: radial-gradient(circle, rgba(255, 255, 230, .14), transparent 65%); }
.desk-ctx { left: 0; top: 0; bottom: auto; z-index: 8; width: 214px; border-radius: 8px; animation: desk-ctx-in .12s ease-out; }
@keyframes desk-ctx-in { from { opacity: 0; transform: translateY(-4px); } }
.desk.is-fresh > .desk-win, .desk.is-fresh > .desk-pc, .desk.is-fresh > .desk-dock { animation: desk-fresh .32s steps(2, jump-none); }
@keyframes desk-fresh { 0% { opacity: 0; } 50% { opacity: 1; } 75% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .desk-ctx { animation: none; } }

/* ---------- the taskbar speaker: desktop sounds on or off (assets/home.js) ---------- */
.desk-snd { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 28px; margin-left: auto; padding: 0; border: 1px solid var(--line); border-radius: 5px;
  background: var(--surface); color: var(--text-dim); font: 800 14px/1 var(--mono); cursor: pointer; }
.desk-snd[hidden] { display: none; }
.desk-snd:not([hidden]) + .desk-clock { margin-left: 0; }
.desk-snd[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.desk-snd[aria-pressed="false"]::after { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; background: currentColor; transform: rotate(-38deg); }
.desk-snd:hover, .desk-snd:focus-visible { color: var(--text); }

/* your desk: "my stats" next to "clear" (opens the player card from assets/deck.js) */
.desk-row-acts { display: flex; gap: var(--s-4); align-items: baseline; }
.desk-stats { padding: 4px 0; border: 0; background: none; font: inherit; font-size: var(--fs-14); cursor: pointer; }

/* ---------- launch: cooked news in the taskbar (assets/eggs.js) ----------
   Decorative (aria-hidden; everything it says is elsewhere on the page). Two copies of the headlines roll left at ~55px
   a second; hover pauses it, so does scrolling the desk away. No JS: one static headline. Hidden under 600px wide. */
.desk-news { position: relative; display: none; flex: 1 1 auto; min-width: 0; align-items: center; gap: 8px; height: 28px; overflow: hidden; }
@media (min-width: 600px) { .desk-news { display: flex; } }
.news-tag { flex: none; padding: 2px 6px; border-radius: 3px; background: var(--alarm); color: #0b0c0e; font: 800 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.news-win { position: relative; display: flex; align-items: center; flex: 1; min-width: 0; height: 100%; overflow: hidden;
  -webkit-mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 28px), transparent); }
.news-track { display: flex; flex: none; white-space: nowrap; }
.news-run { display: inline-flex; flex: none; white-space: nowrap; color: var(--text); font-weight: 700; }
.news-item { padding-right: 2.4em; }
.news-item::before { content: "\25AA\00A0"; color: var(--accent); }
.desk-news:not(.is-on) .news-track { flex: 1; min-width: 0; }
.desk-news:not(.is-on) .news-run { display: block; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
.desk-news.is-on .news-track { animation: news-roll var(--news-t, 60s) linear infinite; }
@keyframes news-roll { to { transform: translateX(-50%); } }
.desk-news:hover .news-track, .desk-news.is-off .news-track, .desk-news.is-breaking .news-track { animation-play-state: paused; }
.news-flash { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: none; padding: 0 10px; border-radius: 4px; background: var(--alarm); color: #0b0c0e; font: 800 12px/28px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desk-news.is-breaking .news-flash { display: block; }
@media (prefers-reduced-motion: reduce) {
  .desk-news .news-track, .desk-news.is-on .news-track { flex: 1; min-width: 0; animation: none; }
  .desk-news .news-run { display: block; overflow: hidden; text-overflow: ellipsis; padding-left: 8px; }
}

/* ---------- launch: the computer's moods (assets/home.js poking, assets/eggs.js waving and konami) ----------
   gary-hot (4+ pokes in a row): a red glow. gary-crit (8+): it wobbles. gary-melt (12, or the konami code): it slumps
   into a lime puddle, then gary-reboot powers it back on like a CRT. desk-meltdown (konami): the windows sag and the
   screen edges glow orange. gary-wave: typing "gary". Reduced motion keeps the words and faces, drops all of the motion. */
.desk-cooked.is-bump b { display: inline-block; }
.desk.gary-hot .desk-mascot { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .6)) drop-shadow(0 0 26px rgba(255, 90, 78, .5)); }
.desk-shadow { transition: transform 2.2s cubic-bezier(.5, 0, .9, .6); }
.desk.gary-melt .desk-shadow { background: radial-gradient(closest-side, rgb(var(--phosphor) / .8), rgb(var(--phosphor) / .25) 65%, transparent); }
.desk.desk-meltdown::after { box-shadow: inset 0 0 200px 70px rgba(255, 110, 40, .5); }
@media (prefers-reduced-motion: no-preference) {
  .desk::after { transition: box-shadow .5s ease; }
  .desk-cooked.is-bump b { animation: cooked-bump .3s steps(3); }
  @keyframes cooked-bump { 50% { transform: translateY(-3px) scale(1.3); color: var(--accent); } }
  .desk.gary-crit .desk-mascot { animation: gary-wobble .16s steps(2) infinite; }
  @keyframes gary-wobble { from { transform: translateX(-2px) rotate(-1deg); } to { transform: translateX(2px) rotate(1deg); } }
  .desk.gary-melt .desk-mascot { animation: none; }
  .desk.gary-melt .desk-mascot > svg, .desk.gary-melt .desk-mascot > img { transform-origin: 50% 100%; animation: gary-melt 2.6s cubic-bezier(.5, 0, .9, .6) forwards; }
  .desk.gary-melt .desk-shadow { transform: scale(2.1, 1.7); }
  @keyframes gary-melt {
    0% { transform: none; filter: none; }
    12% { transform: translateX(-3px); }
    24% { transform: translateX(3px) scaleY(.97); }
    60% { transform: scale(1.12, .72); filter: saturate(1.5); }
    100% { transform: scale(1.55, .1); filter: saturate(2) brightness(1.2); }
  }
  .desk.gary-melt.gary-reboot .desk-mascot > svg, .desk.gary-melt.gary-reboot .desk-mascot > img { animation: gary-on .8s .5s var(--ease-boot) both; }
  .desk.gary-melt.gary-reboot .desk-shadow { transform: none; }
  @keyframes gary-on {
    0% { transform: scale(1.1, .01); filter: brightness(4); }
    45% { transform: scale(1, 1.06); filter: brightness(1.8); }
    100% { transform: none; filter: none; }
  }
  .desk.desk-meltdown { animation: desk-quake .1s steps(2) 16; }
  @keyframes desk-quake { from { transform: translate(-2px, 1px); } to { transform: translate(2px, -1px); } }
  .desk.desk-meltdown > .desk-win, .desk.desk-meltdown > .desk-dock { transform-origin: 50% 0; animation: desk-drip 2.6s cubic-bezier(.6, 0, .9, .5) forwards; }
  @keyframes desk-drip { 0% { transform: none; } 25% { transform: skewX(-2deg); } 100% { transform: translateY(28px) skewY(2.5deg) scaleY(1.05); } }
  .desk.desk-meltdown.gary-reboot > .desk-win, .desk.desk-meltdown.gary-reboot > .desk-dock { animation: desk-unmelt .5s steps(4) both; }
  @keyframes desk-unmelt { 0% { transform: translateY(28px) skewY(2.5deg) scaleY(1.05); opacity: .3; } 100% { transform: none; opacity: 1; } }
  .desk.gary-wave .desk-mascot { transform-origin: 50% 90%; animation: gary-wave 1.2s ease-in-out; }
  @keyframes gary-wave { 0%, 100% { transform: none; } 15% { transform: rotate(-8deg); } 30% { transform: rotate(7deg); } 45% { transform: rotate(-6deg); } 60% { transform: rotate(5deg); } 78% { transform: translateY(-10px); } }
}

/* "gary" typed while the desk is scrolled away: a little computer in the corner (assets/eggs.js) */
.gary-toast { position: fixed; z-index: 60; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; max-width: min(320px, calc(100vw - 32px)); padding: 8px 14px 8px 10px;
  background: var(--text); color: var(--bg); border: 2px solid #000; border-radius: 10px; box-shadow: 4px 4px 0 #000; font: 800 13px/1.3 var(--mono);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .2s, transform .2s var(--ease-out), visibility 0s .2s; pointer-events: none; }
.gary-toast.on { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .2s var(--ease-out); }
.gary-toast img { flex: none; width: 34px; height: 48px; image-rendering: pixelated; }
@media (max-width: 767px) { .gary-toast { bottom: calc(var(--tabbar-h, 64px) + env(safe-area-inset-bottom, 0px) + 12px); } }
@media (prefers-reduced-motion: reduce) { .gary-toast, .gary-toast.on { transform: none; transition: none; } }
