/* Menu concepts preview (MENU_PREVIEW=true only; design/menu-game-20261117).
   Loaded by src/components/site/MenuPreviewNav.tsx, never by the live header, so the live CSS
   bundle is untouched. Markup: src/components/companion-concepts/MenuGame.tsx.

   The frame is serious and neutral: white and grey surfaces, black text, SF. The fun is one accent
   system (friends as player portraits, the globe as a world, pixel glyphs, pixel landscape strips)
   in one small palette that appears ONLY in those accents and in focus rings.
   Not processed by the CSS pipeline: -webkit- prefixes are written by hand. */

/* ---------- tokens ---------- */
.hn--game,
.mp-switch {
  --gm-surface: #ffffff;
  --gm-sheet: #fafaf9;
  --gm-tile: #f4f4f2;
  --gm-tile-hover: #efefec;
  --gm-ink: #0b0b0c;
  --gm-muted: rgba(0, 0, 0, 0.56);
  --gm-faint: rgba(0, 0, 0, 0.42);
  --gm-line: rgba(0, 0, 0, 0.08);
  --gm-line-strong: rgba(0, 0, 0, 0.16);
  --gm-px-w: #ffffff;
  --gm-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gm-sys: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  /* accents (in the spirit of dusk.bot's, Omni's own values): only ever inside icons, strips, chips, rings */
  --gm-sky: #2db4ff;
  --gm-sky-soft: #dcf2ff;
  --gm-lime: #c6e83a;
  --gm-lime-soft: #f1fbc9;
  --gm-lav: #b7a2ff;
  --gm-lav-soft: #ede7ff;
  --gm-pink: #ff8cc0;
  --gm-pink-soft: #ffe4f0;
  --gm-orange: #ff9a3d;
  --gm-orange-soft: #ffead6;
  --gm-grass: #34b759;
  --gm-grass-soft: #dbf4e1;
  --gm-chip-ink: #4a5800;
  --gm-focus: #0a84ff;
  --gm-shadow: 0 0 0 1px var(--gm-line), 0 30px 60px -24px rgba(0, 0, 0, 0.26), 0 6px 16px -8px rgba(0, 0, 0, 0.08);
}
html[data-look-theme="dark"] .hn--game,
  html[data-look-theme="dark"] .mp-switch {
    --gm-surface: #1a1a1c;
    --gm-sheet: #121214;
    --gm-tile: #242427;
    --gm-tile-hover: #2b2b2f;
    --gm-ink: #f5f5f3;
    --gm-muted: rgba(255, 255, 255, 0.62);
    --gm-faint: rgba(255, 255, 255, 0.42);
    --gm-line: rgba(255, 255, 255, 0.09);
    --gm-line-strong: rgba(255, 255, 255, 0.2);
    --gm-px-w: #3b3b40;
    --gm-sky: #45bdff;
    --gm-sky-soft: #183447;
    --gm-lime: #cdee45;
    --gm-lime-soft: #2c3313;
    --gm-lav: #bfaeff;
    --gm-lav-soft: #2c2645;
    --gm-pink: #ff98c6;
    --gm-pink-soft: #43222f;
    --gm-orange: #ffa552;
    --gm-orange-soft: #402a17;
    --gm-grass: #45c768;
    --gm-grass-soft: #1b3a24;
    --gm-chip-ink: #dff47e;
    --gm-focus: #4db1ff;
    --gm-shadow: 0 0 0 1px var(--gm-line), 0 30px 60px -20px rgba(0, 0, 0, 0.7), 0 6px 16px -8px rgba(0, 0, 0, 0.4);
  }

/* ---------- shared ---------- */
.hn--game .gm {
  color: var(--gm-ink);
  font-family: var(--gm-sys);
  text-align: left;
}
.hn--game .gm-card {
  background: var(--gm-surface);
  border-radius: 22px;
  box-shadow: var(--gm-shadow);
  animation: hn-drop 0.18s ease-out;
}
.hn .gm h2.gm-label {
  margin: 0 0 8px 4px;
  font: 500 12px/1.3 var(--gm-mono);
  letter-spacing: 0;
  color: var(--gm-muted);
  text-shadow: none;
}
.hn .gm h2.gm-label span {
  color: var(--gm-faint);
}
.gm .gm-txt {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  line-height: 1.28;
}
.gm .gm-txt b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.gm .gm-txt small {
  font-size: 13px;
  color: var(--gm-muted);
}
.gm .gm-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: 500 11.5px/1 var(--gm-mono);
  color: var(--gm-faint);
  white-space: nowrap;
}
.gm .gm-meta--soon {
  padding: 4px 7px 4px 6px;
  border-radius: 6px;
  background: var(--gm-lime-soft);
  color: var(--gm-chip-ink);
}
.gm .gm-meta--soon .px-k {
  fill: currentColor;
}
.gm .gm-meta--soon .px-w {
  fill: var(--gm-lime-soft);
}
.gm .gm-meta--soon .px-a {
  fill: currentColor;
}

/* pixel glyphs */
.gm-px {
  display: block;
  flex: none;
}
.gm-px .px-k {
  fill: var(--gm-ink);
}
.gm-px .px-w {
  fill: var(--gm-px-w);
}
.gm-px .px-a {
  fill: var(--acc, var(--gm-sky));
}

/* pixel landscape strips */
.gm-band,
.gm-feat-scene {
  display: block;
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: 0 100%;
}
html[data-look-theme="dark"] .gm-band,
  html[data-look-theme="dark"] .gm-feat-scene {
    filter: saturate(0.9) brightness(0.82);
  }

/* focus: the accent blue, on every link and tab */
.hn--game .gm a:focus-visible,
.hn--game .gm-c-tab:focus-visible,
.mp-switch button:focus-visible {
  outline: 2px solid var(--gm-focus);
  outline-offset: 2px;
}

/* keyboard hints (desktop only) */
.gm .gm-hints {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  margin: 0;
  font: 500 11.5px/1 var(--gm-mono);
  color: var(--gm-faint);
}
.gm .gm-hints kbd {
  margin-left: 8px;
  padding: 3px 5px;
  border-radius: 4px;
  font: inherit;
  color: var(--gm-muted);
  background: var(--gm-tile);
  box-shadow: inset 0 -1px 0 var(--gm-line-strong);
}
.gm .gm-hints kbd:first-child {
  margin-left: 0;
}
@media (pointer: coarse) {
  .gm .gm-hints {
    display: none;
  }
}

/* ---------- icons ---------- */
/* A: round player portraits; the world; glyph badges */
.gm-pt {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--acc-soft);
  box-shadow: inset 0 0 0 1px var(--gm-line);
}
.gm-pt--face img {
  width: 50px;
  height: 50px;
  margin-top: 7px;
}
.gm-pt--world {
  background: var(--gm-sky-soft);
}
.gm-pt--world img {
  width: 46px;
  height: 46px;
}
.gm-pt--glyph {
  border-radius: 12px;
}
/* the quiet look's line icons (MenuGame's Icon renders one in every icon; look-c.css shows it only in quiet) */
.gm .gm-li {
  display: none;
}
/* B, C: square inventory slots, a 1px frame with pixel-notched corners and one bright accent pixel */
.gm-slot {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--gm-tile);
  box-shadow: inset 0 0 0 1px var(--gm-line-strong);
  clip-path: polygon(2px 0, calc(100% - 2px) 0, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 0 calc(100% - 2px), 0 2px);
  overflow: hidden;
}
.gm-slot::before {
  content: '';
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  background: var(--acc);
}
.gm-slot--face img {
  width: 38px;
  height: 38px;
  margin-top: 8px;
}
.gm-slot--world img {
  width: 30px;
  height: 30px;
}

/* ---------- A: level select ---------- */
.gm-card.gm-a {
  width: min(880px, calc(100vw - 32px));
  display: grid;
  gap: 14px;
  padding: 16px 16px 14px;
}
.gm-a .gm-a-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gm-a .gm-a-sec--developers .gm-a-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.gm .gm-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 13px;
  border-radius: 14px;
  background: var(--gm-tile);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 0 0 var(--acc-soft);
  transition: transform 0.12s steps(2, end), box-shadow 0.12s steps(2, end), background 0.12s;
}
.gm .gm-tile-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.gm a.gm-tile:hover {
  transform: translateY(-3px);
  background: var(--gm-tile-hover);
  box-shadow: 0 3px 0 0 var(--acc);
}
.gm a.gm-tile::after {
  /* the selection frame of a level select: four pixel corner brackets */
  content: '';
  position: absolute;
  inset: -5px;
  pointer-events: none;
  opacity: 0;
  --b: linear-gradient(var(--gm-ink), var(--gm-ink));
  background: var(--b) 0 0 / 10px 2px, var(--b) 0 0 / 2px 10px, var(--b) 100% 0 / 10px 2px, var(--b) 100% 0 / 2px 10px,
    var(--b) 0 100% / 10px 2px, var(--b) 0 100% / 2px 10px, var(--b) 100% 100% / 10px 2px, var(--b) 100% 100% / 2px 10px;
  background-repeat: no-repeat;
  transition: opacity 0.12s steps(2, end);
}
.gm a.gm-tile:hover::after,
.gm a.gm-tile:focus-visible::after {
  opacity: 1;
}
.gm a.gm-tile:active {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 0 var(--acc);
}
.gm .gm-tile--compact {
  gap: 10px;
}

/* locked: a dashed outline, a grey portrait, the lock chip */
.gm .gm-tile.is-locked {
  cursor: default;
  background: transparent;
  box-shadow: none;
  outline: 1px dashed var(--gm-line-strong);
  outline-offset: -1px;
}
.gm .is-locked .gm-pt img,
.gm .is-locked .gm-slot img {
  filter: grayscale(1);
  opacity: 0.6;
}
.gm .is-locked .gm-pt {
  background: var(--gm-tile);
}
.gm .is-locked .gm-txt b {
  color: var(--gm-muted);
}
.gm-a > .gm-hints {
  padding: 2px 2px 0;
}

/* ---------- B: inventory ---------- */
.gm-card.gm-b {
  width: min(860px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
}
.gm-b .gm-band {
  height: 52px;
}
.gm-b .gm-b-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 12px;
  padding: 16px 12px 12px;
}
.gm .gm-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
  transition: background 0.12s;
}
.gm .gm-row .gm-meta {
  align-self: start;
  margin-top: 4px;
}
.gm a.gm-row:hover {
  background: var(--gm-tile);
}
.gm a.gm-row:hover .gm-slot {
  box-shadow: inset 0 0 0 1px var(--acc);
}
.gm .gm-row.is-locked {
  cursor: default;
}

/* ---------- C: quest log ---------- */
.gm-card.gm-c {
  width: min(840px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  padding: 0;
}
.gm-c .gm-c-nav {
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px 14px;
  border-right: 1px solid var(--gm-line);
}
.gm-c .gm-c-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hn .gm-c .gm-c-tab {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  font: 600 15px/1 var(--gm-sys);
  color: var(--gm-muted);
  text-align: left;
  cursor: pointer;
}
.gm-c .gm-c-tab:hover {
  color: var(--gm-ink);
}
.gm-c .gm-c-tab[aria-selected='true'] {
  color: var(--gm-ink);
  background: var(--gm-tile);
}
.gm-c .gm-c-cur {
  visibility: hidden;
}
.gm-c .gm-c-cur .px-k {
  fill: var(--gm-ink);
}
.gm-c .gm-c-tab[aria-selected='true'] .gm-c-cur {
  visibility: visible;
  animation: gm-nudge 1.2s steps(1, end) infinite;
}
@keyframes gm-nudge {
  50% {
    translate: 2px 0;
  }
}
.gm-c .gm-c-n {
  font: 500 11.5px/1 var(--gm-mono);
  color: var(--gm-faint);
}
.gm-c .gm-hints--compact {
  justify-content: flex-start;
  margin-top: auto;
  padding: 18px 6px 0;
}
.gm-c .gm-c-pane {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 40px 14px 14px;
  animation: hn-drop 0.16s ease-out;
}
.gm-c .gm-c-list {
  display: grid;
  gap: 2px;
}
.gm .gm-feat {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 16px;
  background: var(--gm-tile);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 0 0 var(--acc-soft);
  transition: transform 0.12s steps(2, end), box-shadow 0.12s steps(2, end);
}
.gm a.gm-feat:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 0 0 var(--acc);
}
.gm .gm-feat-scene {
  height: 104px;
  border-radius: 10px;
  transition: background-position 0.9s steps(6, end);
}
.gm a.gm-feat:hover .gm-feat-scene {
  background-position: -36px 100%;
}
/* the friend peeking over the card's top edge (a die-cut sticker, like the landing's) */
.gm .gm-feat-peek {
  position: absolute;
  top: -34px;
  right: 22px;
  width: 68px;
  height: 68px;
  filter: drop-shadow(2px 0 0 #fff) drop-shadow(-2px 0 0 #fff) drop-shadow(0 2px 0 #fff) drop-shadow(0 -2px 0 #fff) drop-shadow(0 6px 8px rgba(0, 0, 0, 0.16));
  pointer-events: none;
}
.gm .gm-feat-peek.is-world {
  top: -26px;
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
}
.gm .gm-feat-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 8px 6px;
}
.gm .gm-feat-body .gm-meta {
  margin-bottom: 4px;
}
.gm .gm-feat-body b {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.gm .gm-feat-body small {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--gm-muted);
}
.gm .gm-feat-go {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
}
.gm .gm-feat-go span {
  display: inline-block;
  transition: transform 0.12s steps(2, end);
}
.gm a.gm-feat:hover .gm-feat-go span {
  transform: translateX(3px);
}

/* ---------- phones: the full-screen sheet, in the same concept ---------- */
.hn--game .hn-sheet {
  background: var(--gm-sheet);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.hn--game .gm-sheet {
  display: grid;
  gap: 18px;
}
.hn--game .gm-sheet.gm-a .gm-a-grid,
.hn--game .gm-sheet.gm-a .gm-a-sec--developers .gm-a-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hn--game .gm-sheet.gm-a .gm-a-grid > .gm-tile:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
}
.hn--game .gm-sheet .gm-tile {
  padding: 11px 11px 12px;
  gap: 10px;
}
.hn--game .gm-sheet.gm-b {
  gap: 0;
}
.hn--game .gm-sheet.gm-b .gm-band {
  height: 39px;
  margin: -6px -16px 12px;
}
.hn--game .gm-sheet.gm-b .gm-b-cols {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0;
}
.hn--game .gm-sheet .gm-row {
  padding: 8px 4px;
}
.hn--game .gm-sheet.gm-c {
  gap: 0;
}
.hn--game .gm-sheet.gm-c .gm-c-nav {
  padding: 0;
  border: 0;
}
.hn--game .gm-sheet.gm-c .gm-c-tabs {
  flex-direction: row;
  gap: 4px;
}
.hn--game .gm-sheet.gm-c .gm-c-tab {
  flex: 1;
  grid-template-columns: 8px auto auto;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  font-size: 14.5px;
}
.hn--game .gm-sheet.gm-c .gm-c-n {
  display: none;
}
.hn--game .gm-sheet.gm-c .gm-c-pane {
  grid-template-columns: 1fr;
  padding: 44px 0 0;
}
.hn--game .gm-sheet .gm-feat-scene {
  height: 96px;
}
/* the bar sits on the sheet: in dark mode its wordmark and pills turn light-on-dark */
html[data-look-theme="dark"] .hn--game.is-sheet .hn-word {
    color: var(--gm-ink);
  }
html[data-look-theme="dark"] .hn--game.is-sheet .hn-pill {
    background: #2a2a2e;
    color: var(--gm-ink);
    box-shadow: inset 0 0 0 1px var(--gm-line);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
html[data-look-theme="dark"] .hn--game.is-sheet .hn-pill--main {
    background: #f5f5f3;
    color: #0b0b0c;
  }

/* ---------- between phone and desktop ---------- */
@media (max-width: 960px) {
  .gm-a .gm-a-sec--developers .gm-a-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gm-card.gm-b .gm-b-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .gm-card.gm-c .gm-c-pane {
    grid-template-columns: 1fr;
  }
}

/* ---------- reduced motion: no lifts, nudges or drifting clouds ---------- */
@media (prefers-reduced-motion: reduce) {
  .hn--game .gm-card,
  .gm-c .gm-c-pane,
  .gm-c .gm-c-tab[aria-selected='true'] .gm-c-cur {
    animation: none;
  }
  .gm .gm-tile,
  .gm .gm-feat,
  .gm .gm-feat-scene,
  .gm .gm-feat-go span {
    transition: none;
  }
  .gm a.gm-tile:hover,
  .gm a.gm-feat:hover,
  .gm a.gm-feat:hover .gm-feat-go span {
    transform: none;
  }
  .gm a.gm-feat:hover .gm-feat-scene {
    background-position: 0 100%;
  }
}

/* ---------- the preview switcher (MENU_PREVIEW only) ----------
   One small "preview ▸" pill in the bottom-left corner; the switchers open above it
   (html[data-preview-open], set by MenuPreviewNav) and stay off the page otherwise. */
.mp-dock {
  position: fixed;
  z-index: 81;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: #0b0b0c;
  color: #fff;
  font: 500 12px/1 var(--gm-mono, ui-monospace, 'SF Mono', Menlo, monospace);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 20px -8px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.mp-dock span {
  color: rgba(255, 255, 255, 0.6);
}
.mp-dock:focus-visible {
  outline: 2px solid #0a84ff;
  outline-offset: 2px;
}
html:not([data-preview-open]) .mp-switch {
  display: none;
}
.mp-switch {
  position: fixed;
  z-index: 80;
  left: calc(14px + env(safe-area-inset-left, 0px));
  bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: #0b0b0c;
  color: #fff;
  font: 500 12px/1 var(--gm-mono);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px -10px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}
.mp-switch-label {
  padding: 0 8px 0 10px;
  color: rgba(255, 255, 255, 0.55);
}
.mp-switch button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  cursor: pointer;
}
.mp-switch button:hover {
  color: #fff;
}
.mp-switch button[aria-pressed='true'] {
  background: #fff;
  color: #0b0b0c;
}
.mp-switch button b {
  font-weight: 700;
}
@media (max-width: 560px) {
  .mp-switch-label,
  .mp-switch button span {
    display: none;
  }
  .mp-switch button {
    width: 34px;
    justify-content: center;
    padding: 0;
  }
}
