/* Catalogue content must never wait behind the decorative torch introduction. */
#page-torch-overlay, #page-torch-beam, #page-torch-beam-little, #cinematic-vignette { display: none !important; }
.cabinet-catalog {
  --cabinet-ink: #17191d;
  --cabinet-paper: #e8edf0;
  --cabinet-muted: #a4acb4;
  color: var(--cabinet-paper);
  opacity: 1;
  transform: none;
  margin-top: 56px;
  letter-spacing: 0;
}
.cabinet-catalog *, .catalog-rating-dialog * { box-sizing: border-box; letter-spacing: 0; }
.cabinet-catalog [hidden] { display: none !important; }
.cabinet-catalog .raycast-section-header { display: block !important; margin-bottom: 0 !important; }
.cabinet-catalog .raycast-header-left { max-width: none !important; margin: 0 0 26px !important; }
.cabinet-catalog .raycast-title { font: 700 36px/1.15 'Space Grotesk', sans-serif !important; margin: 0 0 10px !important; color: #e8edf0 !important; background: none; -webkit-text-fill-color: currentColor; text-shadow: none; animation: none; }
.cabinet-catalog .raycast-subtitle { font: 400 14px/1.6 Inter, sans-serif !important; color: #a4acb4 !important; margin: 0 !important; }
.cabinet-catalog .raycast-header-right { display: flex; align-items: center; gap: 20px; justify-content: space-between; width: 100%; }
.cabinet-catalog .category-filter-container { display: flex; gap: 4px; padding: 4px; border: 1px solid #42464b; border-radius: 6px; background: #17191d; flex: 0 1 auto; max-width: 100%; overflow-x: auto; }
.cabinet-catalog .category-pill { min-height: 38px; padding: 8px 14px; border: 0; border-radius: 3px; background: transparent; color: #b7bfc5; font: 600 13px/1.4 Inter, sans-serif; white-space: nowrap; transform: none; box-shadow: none; transition: background .18s, color .18s; }
.cabinet-catalog .category-pill::before, .cabinet-catalog .category-pill::after { display: none; }
.cabinet-catalog .category-pill.active { color: #17191d; background: #e8edf0; box-shadow: none; }
.cabinet-catalog .category-pill:not(.active):hover { color: #fff; background: #30343b; }
/* The shared dock stylesheet uses !important for its collapsed search control. */
body .cabinet-catalog .raycast-search-container { width: 240px !important; flex: 0 1 240px; height: 46px !important; border: 1px solid #42464b !important; border-radius: 6px !important; background: #17191d !important; gap: 8px !important; padding: 8px 12px !important; transition: none !important; }
body .cabinet-catalog .raycast-search-input { width: 100% !important; min-width: 0; opacity: 1 !important; color: #e8edf0 !important; font-size: 13px; padding-right: 12px; }
.cabinet-catalog .raycast-search-container:focus-within { border-color: #72baff; box-shadow: 0 0 0 2px #72baff33; }
.catalog-status { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 50px; padding: 12px 0; font: 400 12px/1.5 Inter, sans-serif; color: #a4acb4; }
.catalog-count { margin-right: auto; color: #d8dde0; }
.catalog-retry { background: none; color: #72baff; border: 0; text-decoration: underline; cursor: pointer; padding: 6px; font: inherit; }
.cabinet-catalog .raycast-track-viewport { overflow: visible !important; padding: 0 !important; margin: 0; width: 100%; min-height: 0; }
.cabinet-catalog .games-track { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; width: 100% !important; transform: none !important; padding: 0; transition: none !important; will-change: auto !important; }
.cabinet-catalog .cabinet-card {
  --scene-accent: #57e0c5;
  --scene-floor: #193c37;
  display: flex; flex-direction: column; align-items: stretch; position: relative;
  width: auto; min-width: 0; height: auto; padding: 0; margin: 0;
  overflow: hidden; border: 1px solid #454a50; border-radius: 8px;
  background: #202328; text-align: left; cursor: auto;
  box-shadow: 0 5px 0 #0d0f12, 0 6px 0 #454a50, 0 14px 22px #0003;
  transition: border-color .22s, box-shadow .22s;
  animation: none; transform: none; isolation: isolate;
}
.cabinet-card::before, .cabinet-card::after { display: none; }
.cabinet-catalog .cabinet-card:hover, .cabinet-catalog .cabinet-card:focus-within { transform: none; border-color: var(--scene-accent); box-shadow: 0 5px 0 #0d0f12, 0 6px 0 var(--scene-accent), 0 16px 28px #0005; }
.cabinet-card[data-game-id="flappy"], .cabinet-card[data-game-id="2048"] { --scene-accent: #f4d66e; --scene-floor: #3b3b28; }
.cabinet-card[data-game-id="pong"], .cabinet-card[data-game-id="minesweeper"] { --scene-accent: #72baff; --scene-floor: #213746; }
.cabinet-card[data-game-id="multiplayer"], .cabinet-card[data-game-id="tictactoe"] { --scene-accent: #ff817e; --scene-floor: #442d36; }
.cabinet-card[data-game-id="uno_game"] { --scene-accent: #f4d66e; --scene-floor: #3b3b28; }
.cabinet-play { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; outline-offset: -4px; }
.cabinet-screen { aspect-ratio: 1.55; position: relative; overflow: hidden; background: var(--scene-floor); border-bottom: 1px solid #17191d; }
.cabinet-screen::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 10px solid #17191d; box-shadow: inset 0 0 0 1px #ffffff14; }
.cabinet-marquee { position: absolute; z-index: 2; inset: 0 0 auto; height: 35px; padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; color: var(--scene-accent); font: 700 10px/1 Inter, sans-serif; text-transform: uppercase; }
.cabinet-power { width: 5px; height: 5px; background: var(--scene-accent); box-shadow: 0 0 8px color-mix(in srgb, var(--scene-accent) 60%, transparent); }
.cabinet-scene { position: absolute; inset: 35px 18px 18px; display: flex; align-items: center; justify-content: center; transition: transform .45s cubic-bezier(.2,.7,.2,1); transform-origin: center; }
.cabinet-launch { position: absolute; z-index: 3; bottom: 15px; right: 16px; display: flex; align-items: center; gap: 15px; padding: 7px 10px; background: var(--scene-accent); color: #17191d; border-radius: 3px; font: 700 12px/1.2 Inter, sans-serif; box-shadow: 0 3px 0 #0008; transform: translateY(2px); transition: transform .2s; }
.cabinet-launch span { font-size: 18px; line-height: 16px; }
.cabinet-information { padding: 19px 20px 18px; flex: 1; }
.cabinet-mode { font: 500 11px/1.5 Inter, sans-serif; margin: 0 0 7px; color: var(--scene-accent); }
.cabinet-catalog .game-title { color: #f3f5f6; font: 700 23px/1.2 'Space Grotesk', sans-serif; margin: 0 0 10px; text-shadow: none; overflow-wrap: anywhere; white-space: normal; overflow: visible; text-overflow: clip; }
.cabinet-catalog .game-desc { color: #b6bec5; font: 400 12px/1.65 Inter, sans-serif; margin: 0; min-height: 40px; display: block; -webkit-line-clamp: unset; }
.cabinet-console { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 20px; border-top: 1px solid #454a50; background: #2a2e34; }
.cabinet-rating { display: inline-flex; align-items: center; gap: 7px; background: none; color: #d5dce1; border: 0; min-height: 44px; padding: 0; font: 500 11px/1.4 Inter, sans-serif; cursor: pointer; }
.cabinet-rating:hover { color: #fff; }
.rating-star { color: #f4d66e; font-size: 17px; }
.cabinet-vents { width: 38px; height: 11px; background: repeating-linear-gradient(90deg, #121416 0 3px, transparent 3px 7px); transform: skewX(-12deg); }
.cabinet-catalog a:focus-visible, .cabinet-catalog button:focus-visible { outline: 2px solid #72baff; outline-offset: 3px; }
.cabinet-catalog .cabinet-play:focus-visible { outline-offset: -4px; }
.catalog-empty { padding: 54px 20px; text-align: center; border-top: 1px solid #454a50; }
.catalog-empty h2 { font: 700 22px/1.3 'Space Grotesk', sans-serif; margin-bottom: 10px; }
.catalog-empty p { font: 400 14px/1.6 Inter, sans-serif; color: #b6bec5; }
.catalog-empty button { margin-top: 20px; border: 1px solid #72baff; background: transparent; color: #72baff; padding: 10px 16px; border-radius: 4px; cursor: pointer; }

/* Miniature game scenes move only while their own cabinet has attention. */
.cabinet-flight, .cabinet-court, .cabinet-snake { position: absolute; inset: 0; overflow: hidden; }
.flight-pipe { position: absolute; top: 0; right: 23%; width: 34px; height: 22%; background: #57e0c5; box-shadow: inset -7px 0 #218970, 3px 3px #15191d; }
.flight-pipe-bottom { top: auto; bottom: 0; height: 29%; }
.flight-floor { position: absolute; bottom: 0; width: 100%; height: 9px; background: repeating-linear-gradient(90deg,#b4c86e 0 12px,#8ba853 12px 24px); }
.flight-bird { width: 38px; height: 29px; background: #f4d66e; border: 3px solid #17191d; position: absolute; top: 38%; left: 25%; border-radius: 45%; box-shadow: inset 5px -6px #deae48; animation: cabinet-flight 2.5s ease-in-out infinite paused; }
.flight-bird::before { content: ''; position: absolute; width: 12px; height: 13px; right: 0; top: 0; border: 3px solid white; background: #17191d; border-radius: 50%; }
.flight-bird::after { content: ''; position: absolute; width: 16px; height: 7px; right: -8px; top: 13px; background: #ff817e; border: 2px solid #17191d; }
.cabinet-court { border: 1px solid #72baff55; background: linear-gradient(90deg, transparent 49.6%, #72baff55 49.6% 50.4%, transparent 50.4%); }
.court-score { position: absolute; top: 12%; left: 0; width: 100%; text-align: center; font: 700 28px/1 'Space Grotesk', sans-serif; color: #72baff55; }
.court-score span { margin-left: 30px; }
.court-paddle { position: absolute; top: 25%; left: 7%; width: 6px; height: 35px; background: #72baff; }
.court-paddle-right { top: 60%; left: auto; right: 7%; background: #ff817e; }
.court-ball { position: absolute; top: 40%; left: 25%; width: 8px; height: 8px; background: #fff; box-shadow: -7px 3px #ffffff44,-14px 6px #ffffff22; animation: cabinet-rally 2s ease-in-out infinite paused; }
.cabinet-snake { background-image: linear-gradient(#57e0c519 1px, transparent 1px), linear-gradient(90deg,#57e0c519 1px, transparent 1px); background-size: 18px 18px; }
.snake-trail { position: absolute; top: 35%; left: 30%; width: 18px; height: 18px; background: #a6efb2; box-shadow: -20px 0 #57e0c5,-40px 0 #57e0c5,-40px 20px #57e0c5,-40px 40px #57e0c5,-60px 40px #57e0c5; animation: cabinet-snake 2.5s steps(3) infinite paused; }
.snake-snack { width: 13px; height: 13px; background: #ff817e; position: absolute; top: 36%; left: 70%; }
.cabinet-tiles, .cabinet-mines { display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; width: 148px; height: 148px; transform: rotate(-8deg); }
.scene-cell { display: flex; justify-content: center; align-items: center; font: 700 15px/1 'Space Grotesk', sans-serif; border-radius: 3px; }
.cabinet-tiles .scene-cell { color: #17191d; background: #e8edf0; box-shadow: 0 3px 0 #0007; }
.cabinet-tiles .cell-tone-1 { background: #f4d66e; }
.cabinet-tiles .cell-tone-2 { background: #ff817e; }
.cabinet-tiles .scene-cell:empty { background: #ffffff0a; box-shadow: none; }
.cabinet-tiles .scene-cell:nth-child(15) { background: #57e0c5; font-size: 11px; }
.cabinet-mines { transform: rotate(8deg); }
.cabinet-mines .scene-cell { color: #72baff; background: #17191d; border: 1px solid #72baff66; }
.cabinet-mines .scene-cell:empty { background: #72889a; border: 3px outset #9baebe; }
.cabinet-tetris { display: grid; grid-template-columns: repeat(6,1fr); gap: 2px; width: 108px; height: 174px; transform: rotate(-6deg); }
.tetris-pixel { background: #ffffff07; border: 1px solid #ffffff08; }
.pixel-1 { background: #ff817e; }.pixel-2 { background: #72baff; }.pixel-3 { background: #57e0c5; }.pixel-4 { background: #f4d66e; }
.cabinet-art { width: 170px; height: 170px; object-fit: contain; transform: rotate(-9deg); border-radius: 5px; }
.cabinet-tictactoe { display: grid; grid-template-columns: repeat(3,1fr); width: 155px; height: 155px; gap: 6px; transform: rotate(-9deg); }
.cabinet-tictactoe .scene-cell { border: 1px solid #ff817e66; font-size: 28px; color: #ff817e; background: #17191d66; }
.cabinet-tictactoe .scene-cell:nth-child(3n+2) { color: #72baff; }
.cabinet-hand { position: relative; width: 190px; height: 145px; }
.playing-card { position: absolute; left: 52px; top: 5px; width: 85px; height: 122px; background: #e8edf0; color: #17191d; border: 4px solid #e8edf0; border-radius: 7px; padding: 10px; font: 700 26px/1 'Space Grotesk', sans-serif; box-shadow: 0 6px 0 #1116,0 9px 15px #0004; transform: rotate(-22deg) translateX(-37px); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.playing-card:nth-child(2) { transform: rotate(-2deg); }
.playing-card:nth-child(3) { transform: rotate(19deg) translateX(37px); }
.playing-card small { display: block; font-size: 48px; line-height: 1; text-align: center; }
.playing-card.red-suit { color: #d7414a; }
.uno-hand .playing-card { display: flex; align-items: center; justify-content: center; color: #fff; background: #d54b58; font-size: 32px; }
.uno-hand .playing-card:nth-child(2) { background: #337dc0; }
.uno-hand .playing-card:nth-child(3) { background: #269a78; }
@keyframes cabinet-flight { 50% { transform: translateY(-17px) rotate(-12deg); } }
@keyframes cabinet-rally { 45% { transform: translate(115px,38px); } 75% { transform: translate(70px,-28px); } }
@keyframes cabinet-snake { 50% { transform: translateX(42px); } }
@media (hover: hover) and (pointer: fine) {
  .cabinet-card:hover .cabinet-scene { transform: scale(1.06) translateY(-2px); }
  .cabinet-card:hover .cabinet-launch { transform: translateY(0); }
  .cabinet-card:hover .flight-bird, .cabinet-card:hover .court-ball, .cabinet-card:hover .snake-trail { animation-play-state: running; }
  .cabinet-card:hover .playing-card:first-child { transform: rotate(-28deg) translateX(-49px); }
  .cabinet-card:hover .playing-card:last-child { transform: rotate(26deg) translateX(49px); }
}
.cabinet-card:focus-within .flight-bird, .cabinet-card:focus-within .court-ball, .cabinet-card:focus-within .snake-trail { animation-play-state: running; }
.cabinet-motion-off .cabinet-card *, .cabinet-motion-off .cabinet-card { animation-play-state: paused !important; transition: none !important; }
.cabinet-motion-off .cabinet-card:hover .cabinet-scene { transform: none; }
.catalog-rating-dialog { width: min(420px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 32px; border: 1px solid #535b63; border-radius: 8px; background: #202328; color: #e8edf0; font-family: Inter,sans-serif; }
.catalog-rating-dialog::backdrop { background: #080a0dc9; }
.catalog-rating-dialog h2 { font: 700 24px/1.3 'Space Grotesk',sans-serif; padding-right: 15px; margin-bottom: 24px; }
.catalog-dialog-close { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; font-size: 27px; color: #e8edf0; background: none; border: 0; cursor: pointer; }
.catalog-rating-dialog fieldset { border: 0; padding: 0; margin: 0; }
.catalog-rating-dialog legend { color: #b6bec5; font-size: 13px; margin-bottom: 10px; }
.catalog-rating-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; }
.catalog-rating-options label { position: relative; text-align: center; cursor: pointer; }
.catalog-rating-options input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.catalog-rating-options span { display: block; color: #717b85; font-size: 35px; line-height: 50px; border: 1px solid #535b63; border-radius: 4px; }
.catalog-rating-options .selected span { color: #f4d66e; border-color: #f4d66e66; }
.catalog-rating-options input:focus-visible + span { outline: 2px solid #72baff; outline-offset: 2px; }
.catalog-rating-feedback { font-size: 13px; line-height: 1.5; color: #ffaaa8; margin: 15px 0; min-height: 20px; }
.catalog-rating-save { width: 100%; min-height: 44px; border: 0; border-radius: 4px; color: #17191d; background: #57e0c5; font: 700 14px/1.4 Inter,sans-serif; cursor: pointer; }
.catalog-rating-save:disabled { opacity: .5; cursor: wait; }
@media (max-width: 1050px) {
  .cabinet-catalog .games-track { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cabinet-catalog .raycast-header-right { flex-wrap: wrap; gap: 12px; }
  body .cabinet-catalog .raycast-search-container { width: 100% !important; flex-basis: 100%; }
}
@media (max-width: 600px) {
  body header { display: grid !important; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "brand actions" "nav nav"; height: 92px !important; border-radius: 8px !important; gap: 8px; }
  body header .logo { grid-area: brand; letter-spacing: 0 !important; }
  body header .header-actions { grid-area: actions; }
  body header .header-nav { grid-area: nav; position: static !important; transform: none !important; width: 100% !important; }
  body header .header-nav .dock-panel { justify-content: space-between !important; gap: 8px !important; }
  body { padding-top: 125px !important; }
  body .minion-container { left: 0 !important; width: 44px !important; height: 60px !important; }
  body .little-minion-container { right: 0 !important; width: 44px !important; height: 60px !important; }
  .cabinet-catalog { margin-top: 32px; }
  .cabinet-catalog .raycast-title { font-size: 28px !important; }
  .cabinet-catalog .games-track { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .cabinet-catalog .category-filter-container { width: 100%; }
  .cabinet-catalog .category-pill { padding-inline: 12px; }
  .cabinet-screen { aspect-ratio: 1.35; }
  .cabinet-catalog .game-title { font-size: 24px; }
  .cabinet-catalog .game-desc { min-height: 0; }
  .catalog-sync { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cabinet-catalog *, .cabinet-catalog *::before, .cabinet-catalog *::after { animation: none !important; transition: none !important; }
  .cabinet-card:hover .cabinet-scene { transform: none; }
}
