/* The home screen. Palette taken from the hound: night-blue fur, amber eyes, blood-red ears and mouths, bone fangs. */
:root { /* (shared: the home screen, the data window) */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ink: #05070f; --night: #080c17; --surface: #0e1424; --raised: #141b2e; --raised-2: #1b2340;
  --line: #2b3347; --line-soft: #1c2440;
  --fg: #eceef5; --muted: #9aa3bd; --faint: #7a84a3;
  --ember: #f8901f; --ember-hi: #ffb56b; --ember-lo: #b75d14; --blood: #e0242a; --bone: #ecd9ae; --steel: #6ea8d8;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
#menu {
  position: absolute; inset: 0; overflow: hidden auto; isolation: isolate;
  background: var(--night); color: var(--fg); font: 15px/1.5 var(--sans);
  scroll-behavior: smooth; scrollbar-color: #2b3347 transparent; scrollbar-width: thin;
}
#menu *, #menu *::before, #menu *::after { box-sizing: border-box; }
#menu .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---- the scene behind everything */
#menu .hm-bg { position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(70% 55% at 80% 6%, #1b2748 0%, transparent 62%),
    radial-gradient(60% 50% at 8% 104%, #1a1226 0%, transparent 70%),
    linear-gradient(#080c17, #05070f); }
#menu .hm-backdrops { position: absolute; inset: 0; }
#menu .hm-bd { position: absolute; inset: -60px; background: center 20% / cover no-repeat; opacity: 0; transition: opacity 1.1s ease;
  filter: blur(34px) brightness(.5) saturate(.8); -webkit-mask-image: linear-gradient(#000 0, #000 30%, transparent 78%); mask-image: linear-gradient(#000 0, #000 30%, transparent 78%); }
#menu .hm-bd.on { opacity: .5; }
#menu .hm-vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 25%, transparent 35%, rgba(3, 5, 12, .78) 100%); }
#menu .hm-grain { position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#hmEmbers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }

#menu .hm-page { min-height: 100%; display: flex; flex-direction: column; }
#menu main { flex: 1; display: flex; flex-direction: column; }
#menu .hm-wrap { width: min(1180px, 100% - 48px); margin-inline: auto; }

/* ---- header */
#menu .hm-nav { position: sticky; top: 0; z-index: 20; height: 56px; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s; }
#menu .hm-nav.scrolled { background: rgba(8, 12, 23, .8); border-color: var(--line-soft); backdrop-filter: blur(14px) saturate(1.2); }
#menu .hm-nav .hm-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#menu .hm-brand { display: flex; align-items: center; gap: 11px; color: var(--bone); user-select: none; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease); }
#menu .hm-nav.scrolled .hm-brand { opacity: 1; transform: none; }
#menu .hm-brand img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(248, 144, 31, .35)); }
#menu .hm-brand span { font: 700 13px var(--serif); letter-spacing: .34em; text-transform: uppercase; }
#menu .hm-actions { display: flex; align-items: center; gap: 10px; }

#menu .hm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(20, 27, 46, .72); color: var(--fg); font: 600 13px var(--sans); cursor: pointer; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s var(--ease); backdrop-filter: blur(8px); }
#menu .hm-btn:hover { background: var(--raised-2); border-color: #4a5a82; }
#menu .hm-btn:active { transform: translateY(1px); }
#menu .hm-btn:focus-visible, #menu .hm-lang button:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
#menu .hm-btn.icon { width: 38px; padding: 0; }
#menu .hm-btn.icon svg { width: 18px; height: 18px; }
/* the account button: a little person; a green dot while signed in */
#menu #hmAccountBtn { position: relative; }
#menu .hm-dot { display: none; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: #4fd6a0; box-shadow: 0 0 0 2px #121a2e, 0 0 8px #4fd6a0; }
#menu #hmAccountBtn[data-signed] { color: var(--ember-hi); border-color: rgba(248, 144, 31, .45); }
#menu #hmAccountBtn[data-signed] .hm-dot { display: block; }
#menu .hm-lang { display: inline-flex; gap: 2px; height: 38px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: rgba(20, 27, 46, .72); backdrop-filter: blur(8px); }
#menu .hm-lang button { display: grid; place-items: center; width: 40px; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer; transition: background .2s, box-shadow .2s; }
#menu .hm-lang .hm-flag { width: 26px; height: 17px; opacity: .62; filter: saturate(.7); transition: opacity .2s, filter .2s; }
#menu .hm-lang button:hover .hm-flag { opacity: .95; filter: none; }
#menu .hm-lang button[aria-pressed="true"] { background: rgba(248, 144, 31, .16); box-shadow: inset 0 0 0 1px rgba(248, 144, 31, .55); }
#menu .hm-lang button[aria-pressed="true"] .hm-flag { opacity: 1; filter: none; }

/* a flag: a 3:2 board with a little light on it (drawn in home.js) */
#menu .hm-flag { position: relative; display: inline-block; flex: none; width: 24px; height: 16px; border-radius: 3px; overflow: hidden; }
#menu .hm-flag svg { display: block; width: 100%; height: 100%; }
#menu .hm-flag::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(135deg, rgba(255, 255, 255, .26), transparent 48%, rgba(0, 0, 0, .18)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
#menu .hm-flag.code { display: inline-grid; place-items: center; background: #232c45; color: var(--muted); font: 700 9px var(--mono); letter-spacing: .04em; }

/* ---- hero */
#menu .hm-hero { --k: 2; --cell: 6px; position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 0 0 12px; }
#menu .hm-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 660px; }
#menu .hm-copy > * { animation: hm-rise .8s var(--ease) backwards; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
#menu .hm-over { --d: 0; display: flex; align-items: center; gap: 12px; margin: 0; font: 600 11px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--ember); }
#menu .hm-over::before { content: ""; width: 34px; height: 1px; background: linear-gradient(90deg, transparent, var(--ember)); }
#menu .hm-title { --d: 1; margin: 0; line-height: 0; }
#menu .hm-title svg { display: block; width: calc(42 * var(--cell)); height: calc(8 * var(--cell)); overflow: visible; filter: drop-shadow(0 0 22px rgba(248, 144, 31, .3)); }
#menu .hm-tagline { --d: 2; margin: 0; max-width: 42ch; font: 400 clamp(15px, 1.25vw, 17px)/1.5 var(--serif); color: #c6cce0; text-wrap: balance; }
#menu .hm-cta { --d: 3; display: inline-flex; align-items: center; gap: 13px; max-width: 100%; padding: 8px 20px 8px 8px; border-radius: 14px; border: 1px solid rgba(255, 190, 110, .55); cursor: pointer; text-align: left;
  background: linear-gradient(180deg, #ffa445 0%, #f0790f 100%); color: #1a0f05; box-shadow: 0 12px 34px rgba(248, 144, 31, .28), inset 0 1px 0 rgba(255, 255, 255, .4);
  transition: transform .25s var(--ease), box-shadow .25s, filter .25s; }
#menu .hm-cta:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 18px 44px rgba(248, 144, 31, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
#menu .hm-cta:active { transform: translateY(0); }
#menu .hm-cta:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#menu .hm-cta .ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: #1a0f05; color: var(--ember-hi); }
#menu .hm-cta .ico svg { width: 15px; height: 15px; margin-left: 2px; }
#menu .hm-cta small { display: block; font: 700 9.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; opacity: .72; }
#menu .hm-cta b { display: block; margin-top: 1px; font: 700 17px/1.2 var(--serif); overflow-wrap: anywhere; }
#menu .hm-points { --d: 4; display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; padding: 0; list-style: none; color: var(--muted); font: 12.5px var(--sans); }
#menu .hm-points li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 9px 1px 0; background: var(--ember-lo); transform: rotate(45deg); }

#menu .hm-hound { --k: 2; position: relative; align-self: end; justify-self: center; width: calc(140px * var(--k)); margin: 0 0 -14px; animation: hm-fade 1.2s ease backwards .15s; user-select: none; }
#menu .hm-sprite { position: relative; animation: hm-bob 3.4s steps(1, end) infinite; } /* (idle: up by one pixel of the art, in a step — never a fractional move of pixel art) */
#menu .hm-hound img { display: block; width: 100%; height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 1px rgba(248, 144, 31, .5)) drop-shadow(0 10px 22px rgba(0, 0, 0, .6)); }
#menu .hm-halo { position: absolute; inset: -18% -32% -6%; background: radial-gradient(closest-side, rgba(248, 144, 31, .26), rgba(224, 36, 42, .1) 58%, transparent 78%); filter: blur(8px); animation: hm-pulse 5.5s ease-in-out infinite; }
#menu .hm-floor { position: absolute; left: 6%; right: 6%; bottom: -4%; height: 9%; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(3px); }
#menu .hm-eye { position: absolute; z-index: 2; left: var(--x); top: var(--y); width: calc(15px * var(--k)); height: calc(15px * var(--k)); transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 176, 74, .9) 0 12%, rgba(255, 112, 22, .5) 36%, rgba(224, 36, 42, .16) 55%, transparent 70%); animation: hm-eye 4.8s ease-in-out infinite; }
#menu .hm-eye + .hm-eye { animation-delay: -1.7s; }
#menu[data-hot] .hm-eye { animation-duration: 1.6s; filter: brightness(1.5) saturate(1.2); }
#menu[data-hot] .hm-halo { animation-duration: 2.4s; }

@keyframes hm-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes hm-fade { from { opacity: 0; } }
@keyframes hm-bob { 50% { transform: translateY(calc(var(--k) * -1px)); } }
@keyframes hm-pulse { 50% { opacity: .72; transform: scale(1.05); } }
@keyframes hm-eye { 0%, 100% { opacity: .78; transform: translate(-50%, -50%) scale(.92); } 45% { opacity: 1; transform: translate(-50%, -50%) scale(1.16); } 52% { opacity: .55; } 58% { opacity: 1; } }

/* ---- library */
#menu .hm-lib { --fixed: 646px; padding: 4px 0 22px; }
#menu .hm-lib-head { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; }
#menu .hm-lib-head h2 { margin: 0; font: 700 12.5px var(--mono); letter-spacing: .26em; text-transform: uppercase; color: var(--bone); }
#menu .hm-lib-head .count { font: 12px var(--mono); color: var(--faint); }
/* who plays: the Orthros account, or a warning that nothing is saved on one */
#menu .hm-who { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13.5px; color: #b9c2d6; background: rgba(126,224,126,.05); border: 1px solid rgba(126,224,126,.18); }
#menu .hm-who[hidden] { display: none; }
#menu .hm-who.warn { color: #f0dcb5; background: rgba(244,180,60,.08); border-color: rgba(244,180,60,.45); }
#menu .hm-who.warn::before { content: "⚠"; color: #ffcf7a; font-size: 16px; }
#menu .hm-who span { flex: 1; min-width: 240px; }
#menu .hm-who .hm-btn { height: 32px; }
#menu .hm-lib-head .hm-legal { order: 4; color: var(--faint); font: 12px var(--sans); white-space: nowrap; }
#menu .hm-legal a { color: var(--faint); text-decoration: none; } #menu .hm-legal a:hover, #menu .hm-legal a:focus-visible { color: var(--muted); text-decoration: underline; }
#menu .hm-lib-head::after { content: ""; flex: 1; align-self: center; height: 1px; order: 3; background: linear-gradient(90deg, var(--line), transparent); }
/* the filters: all, then the library's tags by group (the kind of game, the ways to play it), with their counts */
#menu .hm-metas { display: grid; gap: 4px; min-width: 0; }
#menu .hm-live { font: 11.5px var(--mono); color: #7ec27e; }
#menu .hm-live:empty { display: none; }
#menu .hm-live::before { content: "● "; }
#menu .hm-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
#menu .hm-tabs .sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
#menu .hm-tabs[hidden] { display: none; }
#menu .hm-tab { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 13px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(14, 20, 36, .7); color: var(--muted); font: 600 13px var(--sans); transition: color .15s, background .15s, border-color .15s; }
#menu .hm-tab .n { font: 11.5px var(--mono); color: var(--faint); min-width: 18px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .05); text-align: center; }
#menu .hm-tab:hover { color: var(--fg); border-color: #3a4560; }
#menu .hm-tab:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
#menu .hm-tab[aria-pressed="true"] { color: var(--bone); border-color: rgba(248, 144, 31, .55); background: rgba(248, 144, 31, .14); }
#menu .hm-tab[aria-pressed="true"] .n { color: var(--ember-hi); background: rgba(248, 144, 31, .16); }
#menu .hm-tab.none { opacity: .45; }
#menu .hm-tab[data-tag]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 55%, transparent); }
#menu .hm-tab[data-tag][aria-pressed="true"] { color: var(--c); border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
#menu .hm-tab[data-tag][aria-pressed="true"] .n { color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); }
/* the tags: one color each, the same on the cards and in the filters */
#menu :where(.hm-tag, .hm-tab[data-tag]) { --c: var(--muted); }
#menu [data-tag="windows"] { --c: #6ea8d8; }
#menu [data-tag="recompiled"] { --c: #4fd6a0; }
#menu [data-tag="modified"] { --c: #f2b84b; }
#menu [data-tag="solo"] { --c: #b59cff; }
#menu [data-tag="multiplayer"] { --c: #ff7aa8; }
#menu [data-tag="story"] { --c: #7fd4e6; }
#menu [data-tag="free"] { --c: #f39a6b; }
#menu .hm-grid { --n: 2; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 24px; max-width: calc(var(--n) * 460px + (var(--n) - 1) * 24px); }

#menu .hm-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); cursor: pointer; outline: none;
  background: linear-gradient(180deg, rgba(22, 30, 52, .9), rgba(13, 19, 34, .94)); box-shadow: 0 10px 30px rgba(0, 0, 0, .38);
  animation: hm-rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 100ms + 380ms);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
#menu .hm-card.still { animation: none; }
#menu .hm-card[hidden], #menu .hm-empty[hidden] { display: none; }
#menu .hm-card:hover, #menu .hm-card:focus-visible { transform: translateY(-5px); border-color: rgba(248, 144, 31, .75); box-shadow: 0 22px 50px rgba(0, 0, 0, .6), 0 0 0 1px rgba(248, 144, 31, .3), 0 0 46px -8px rgba(248, 144, 31, .34); }
#menu .hm-card:focus-visible { box-shadow: 0 22px 50px rgba(0, 0, 0, .6), 0 0 0 2px var(--ember), 0 0 46px -6px rgba(248, 144, 31, .45); }
#menu .hm-cover { position: relative; aspect-ratio: 16 / 9; min-height: 120px; max-height: max(120px, calc(100dvh - var(--fixed))); overflow: hidden; background: #0b101c; } /* (16:9, but shorter when the window is: all the library shows without scrolling; --fixed: the rest of its height, tabs included) */
#menu .hm-cover img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; opacity: 0; transition: transform .8s var(--ease), opacity .6s; }
#menu .hm-cover img.loaded { opacity: 1; }
#menu .hm-card:hover .hm-cover img, #menu .hm-card:focus-visible .hm-cover img { transform: scale(1.05); }
#menu .hm-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(13, 19, 34, .96)); pointer-events: none; }
#menu .hm-cover.none { background: radial-gradient(70% 90% at 50% 40%, #1d2848, #0b101c); }
#menu .hm-cover img.glyph { inset: 14% 0; height: 72%; object-fit: contain; image-rendering: pixelated; }
#menu .hm-cover img.glyph.loaded { opacity: .5; }
#menu .hm-badge { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; border: 1px solid rgba(248, 144, 31, .5); background: rgba(5, 7, 15, .72); backdrop-filter: blur(6px);
  color: var(--ember-hi); font: 700 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
#menu .hm-body { display: flex; flex: 1; flex-direction: column; gap: 4px; padding: 2px 18px 14px; }
#menu .hm-body h3 { margin: 0; font: 700 19px/1.25 var(--serif); color: #f6efdc; }
#menu .hm-body p { margin: 0; flex: 1; color: var(--muted); font-size: 13.5px; line-height: 1.45; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
/* choices: one row each — the version (chips, the rest in an "Others" select), the game's language (flags) */
#menu .hm-choices { display: grid; gap: 6px; margin-top: 8px; }
#menu .hm-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
#menu .hm-row-label { flex: none; width: 58px; font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
#menu .hm-seg { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
#menu .hm-opt { appearance: none; display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px; margin: 0; border-radius: 8px; border: 1px solid var(--line); background: rgba(8, 12, 23, .55);
  color: var(--muted); font: 600 12px var(--sans); white-space: nowrap; cursor: pointer; transition: border-color .2s, background .2s, color .2s, box-shadow .2s; }
#menu .hm-opt:hover:not(:disabled):not(.solo) { border-color: #4a5a82; background: rgba(27, 35, 64, .75); color: var(--fg); }
#menu .hm-opt.on:not(.solo) { border-color: var(--ember); background: rgba(248, 144, 31, .14); color: var(--ember-hi); box-shadow: 0 0 0 1px rgba(248, 144, 31, .22), 0 0 16px -4px rgba(248, 144, 31, .5); }
#menu .hm-opt:focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; }
#menu .hm-opt:disabled { opacity: .4; cursor: not-allowed; border-style: dashed; }
#menu .hm-opt.solo { cursor: default; border-color: var(--line-soft); background: transparent; color: var(--bone); }
#menu .hm-opt.is-flag { padding: 0 8px; }
#menu .hm-opt.is-flag .hm-flag { opacity: .72; filter: saturate(.7); transition: opacity .2s, filter .2s; }
#menu .hm-opt.is-flag:hover:not(:disabled) .hm-flag, #menu .hm-opt.is-flag.on .hm-flag, #menu .hm-opt.is-flag.solo .hm-flag { opacity: 1; filter: none; }
#menu select.hm-opt { max-width: 100%; padding-right: 28px; color-scheme: dark; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%239aa3bd' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
#menu select.hm-opt.on { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23ffb56b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); }
#menu .hm-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
#menu .hm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-width: 0; }
#menu .hm-tag { display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 6px; border: 1px solid color-mix(in srgb, var(--c) 35%, transparent);
  background: color-mix(in srgb, var(--c) 11%, transparent); color: var(--c); font: 600 11.5px var(--sans); white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s; }
#menu .hm-tag:hover { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
#menu .hm-tag[aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 24%, transparent); }
#menu .hm-tag:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
#menu .hm-missing { font: 11.5px var(--mono); color: var(--faint); }
#menu .hm-play { flex: none; display: inline-flex; align-items: center; gap: 9px; height: 32px; padding: 0 16px 0 12px; border-radius: 9px; border: 1px solid rgba(248, 144, 31, .5);
  background: rgba(248, 144, 31, .12); color: var(--ember-hi); font: 700 13px var(--sans); cursor: pointer; transition: background .25s, color .25s, border-color .25s, box-shadow .25s; }
#menu .hm-card:hover .hm-play, #menu .hm-card:focus-visible .hm-play { background: var(--ember); border-color: var(--ember); color: #1a0f05; box-shadow: 0 6px 20px rgba(248, 144, 31, .35); }
#menu .hm-play:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
#menu .hm-dl { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px 8px 8px; border-radius: 8px; background: rgba(255, 255, 255, .03); font: 11.5px var(--mono); color: var(--faint); cursor: default; }
#menu .hm-dl[hidden] { display: none; }
#menu .hm-launch + .hm-dl { margin-top: 4px; }
#menu .hm-dl-text { flex: 1; min-width: 0; line-height: 1.45; overflow-wrap: break-word; }
#menu .hm-dl[data-state="running"] .hm-dl-text, #menu .hm-dl[data-state="done"] .hm-dl-text { color: var(--bone); }
#menu .hm-dl-bar { position: absolute; left: 8px; right: 8px; bottom: 3px; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .06); overflow: hidden; }
#menu .hm-dl-bar i { display: block; height: 100%; width: 0; background: var(--ember); transition: width .4s; }
#menu .hm-dl-btn { flex: none; height: 24px; padding: 0 10px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: var(--bone); font: 11.5px var(--mono); cursor: pointer; }
#menu .hm-dl-btn:hover, #menu .hm-dl-btn:focus-visible { border-color: var(--ember); color: var(--ember); }
#menu .hm-dl-btn[hidden] { display: none; }
#menu .hm-card.unavailable { cursor: default; filter: saturate(.3); opacity: .55; }
#menu .hm-card.unavailable:hover { transform: none; border-color: var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .38); }
#menu .hm-card.skeleton { cursor: default; pointer-events: none; }
#menu .hm-card.skeleton .hm-cover, #menu .hm-card.skeleton h3, #menu .hm-card.skeleton p { background: linear-gradient(100deg, #111829 30%, #1a2340 50%, #111829 70%) 0 0 / 220% 100%; animation: hm-shimmer 1.6s linear infinite; border-radius: 8px; }
#menu .hm-card.skeleton .hm-cover { border-radius: 0; }
#menu .hm-card.skeleton h3 { height: 24px; width: 60%; } #menu .hm-card.skeleton p { height: 48px; }
@keyframes hm-shimmer { to { background-position: -220% 0; } }
#menu .hm-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 30px 34px; max-width: 640px; border-radius: 18px; border: 1px dashed #3a4666; background: rgba(14, 20, 36, .6); }
#menu .hm-empty img { width: 70px; height: 71px; image-rendering: pixelated; opacity: .8; flex: none; }
#menu .hm-empty h3 { margin: 0 0 6px; font: 700 20px var(--serif); color: #f6efdc; }
#menu .hm-empty p { margin: 0 0 14px; color: var(--muted); }
#menu .hm-empty.error h3 { color: #ffb0b0; }
#menu .hm-empty code { white-space: nowrap; padding: 2px 8px; border-radius: 6px; background: #0b101c; border: 1px solid var(--line); color: var(--ember-hi); font: 12.5px var(--mono); }

/* ---- sizes: a tall window gets the big hound, a short one the small hound (the library always fits when it can) */
@media (min-width: 1240px) and (min-height: 960px) {
  #menu .hm-hero { --cell: 8px; }
  #menu .hm-hound { --k: 3; }
  #menu .hm-lib { --fixed: 786px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  #menu .hm-hound { --k: 1; margin-bottom: 0; }
  #menu .hm-lib { --fixed: 586px; }
  #menu .hm-points { display: none; }
}
@media (max-width: 1100px) and (min-width: 901px) { #menu .hm-lib { --fixed: 676px; } } /* (narrow cards: their text wraps more) */
@media (max-width: 900px) {
  #menu .hm-hero { grid-template-columns: 1fr; justify-items: start; gap: 8px; padding-top: 0; }
  #menu .hm-hound { order: -1; align-self: center; justify-self: center; margin: 0 auto -14px; }
  #menu .hm-copy { max-width: none; }
  #menu .hm-cover { max-height: none; }
}
@media (max-width: 560px) {
  #menu .hm-wrap { width: calc(100% - 32px); }
  #menu .hm-hound { --k: 1; margin-top: 10px; }
  #menu .hm-cta { width: 100%; }
  #menu .hm-brand span { display: none; }
  #menu .hm-actions { gap: 8px; }
  #menu .hm-body { padding-inline: 16px; }
  #menu .hm-tabs .sep { display: none; }
  #menu .hm-empty { flex-direction: column; text-align: center; padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  #menu *, #menu *::before, #menu *::after { animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto; }
}
