/* The Liming — the gallery (home page): white glass cards; at the bottom of each, a stack of three tinted glass cards
   showing a glimpse of the game. The stack is cut off by the card's lower edge, and tapping it throws the front
   card back behind the others (see games/gallery.js). */

/* header */
section.block.gal-head { position: relative; z-index: 5; padding-bottom: clamp(28px, 4vw, 48px); }
.gal-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.snd-btn { display: inline-flex; align-items: center; gap: 9px; font: 400 14px/1 var(--body); color: var(--ink); background: var(--ground); border: 1px solid var(--hair); border-radius: 999px; padding: 12px 18px; cursor: pointer; }
.snd-btn:hover { border-color: var(--muted); }
.snd-btn svg { width: 17px; height: 17px; }
.snd-btn .x { display: none; } .snd-btn.off .w { display: none; } .snd-btn.off .x { display: inline; }
.snd-btn.off .lbl { color: var(--muted); }
.gal-pack .snd-btn .pi svg { width: 17px; height: 17px; display: block; }
.gal-pack .snd-btn .pc { opacity: .5; font-size: 11px; margin-left: 2px; }
.gal-pack .g-packmenu { left: 0; right: auto; }


/* grid */
.gallery { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr)); gap: 22px;
  padding: 0 var(--gutter) clamp(56px, 8vw, 96px); max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; }

/* one game */
.gxc {
  --pad: clamp(24px, 4vw, 44px);
  --cw: min(66cqw, 350px);                      /* width of a stack card */
  container-type: inline-size;
  position: relative; overflow: hidden; isolation: isolate; scroll-margin-top: 90px;
  display: flex; flex-direction: column;
  padding: var(--pad) var(--pad) 0; border-radius: 40px;
  background: linear-gradient(170deg, rgba(255,255,255,.92), rgba(255,255,255,.66));
  box-shadow: var(--gl-rim), var(--gl-edge), 0 24px 48px -28px rgba(20,22,40,.35);
}
:root:not(.glass) .gxc { background: var(--surface); box-shadow: none; border: 1px solid var(--hair); }
.gxc-no { position: absolute; top: var(--pad); right: var(--pad); font-size: 14px; letter-spacing: .12em; color: var(--muted); font-variant-numeric: tabular-nums; }
.gxc-body { display: grid; justify-items: start; gap: 12px; position: relative; z-index: 4; }
/* icon tile: frosted matte glass in the game's own colour — soft light-to-deep fill, fine grain, a white rim, a soft glow */
.gxc-ic { position: relative; isolation: isolate; overflow: hidden; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 8px; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--k) 58%, #fff), color-mix(in srgb, var(--k) 74%, #fff) 55%, color-mix(in srgb, var(--k) 80%, #fff));
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.42), inset 0 1.5px 2px rgba(255,255,255,.55), inset 0 -2px 6px -2px color-mix(in srgb, var(--k) 45%, transparent),
    0 0 0 1px rgba(255,255,255,.7), 0 12px 24px -12px color-mix(in srgb, var(--k) 70%, transparent), 0 2px 6px -2px color-mix(in srgb, var(--k) 40%, transparent); }
.gxc-ic::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none; opacity: .32; mix-blend-mode: soft-light;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.gxc-ic svg { width: 30px; height: 30px; }
.gxc-ic .gic-line { stroke-width: 2.4px; color: #fff; }
.gxc-ic .gic-color { width: 40px; height: auto; }
.gxc-ic .blob { width: 44px; height: 44px; }   /* ONE LIFE: Ray, a little larger (his drawing leaves room for antennae) */
/* energy count: the logo's four marks side by side */
.gxc-ic:has(.mk) { display: flex; align-items: center; justify-content: center; gap: 1px; }
.gxc-ic .mk { width: 8px !important; height: 14px !important; background: #fff; rotate: -20deg !important; }
.gxc-ic .mk:nth-child(2) { width: 7px !important; height: 12px !important; rotate: 25deg !important; }
.gxc-ic .mk:nth-child(3) { width: 9px !important; height: 17px !important; rotate: 0deg !important; }
.gxc-ic .mk:nth-child(4) { width: 6px !important; height: 11px !important; rotate: -35deg !important; }
.gxc-t { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(40px, 6vw, 56px); line-height: 1; letter-spacing: -.045em; text-transform: lowercase; }
.gxc-d { margin: 0; max-width: 34ch; font-size: clamp(17px, 2vw, 20px); line-height: 1.4; color: color-mix(in srgb, var(--ink) 78%, transparent); text-wrap: pretty; }
.gxc-best { margin: 4px 0 8px; font-size: 14px; color: var(--muted); }
.gxc-cta { display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 28px 0 30px; border-radius: 999px; text-decoration: none;
  font-size: 18px; text-transform: lowercase; color: #fff; background: #16171b;
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,.25), 0 16px 30px -16px rgba(20,22,40,.6);
  transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.gxc-cta:hover { transform: translateX(3px); }
.gxc-cta svg { width: 20px; height: 20px; }

/* the stack: it runs to the card's edges, and the card's lower edge cuts it off */
.deck { filter: saturate(1.2);   /* the stack's colours, 20% more saturated */
  position: relative; display: block; flex: none; height: calc(var(--cw) * (.36 + 1.25 * .85)); margin: 28px calc(-1 * var(--pad)) 0; padding: 0; border: 0; background: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.deck:focus-visible { outline: 2px solid var(--ink); outline-offset: -6px; border-radius: 0 0 36px 36px; }
.dc {
  position: absolute; left: calc(100% - var(--cw) * 1.46); top: calc(var(--cw) * .32); width: var(--cw); aspect-ratio: 4 / 5;
  display: flex; flex-direction: column; gap: 9px; padding: 12px; border-radius: 26px; text-align: left; color: #fff;
  min-height: 0; overflow: hidden;   /* text never stretches the card past 4:5 */
  background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.05) 30%, rgba(255,255,255,0) 36%),
    linear-gradient(165deg, color-mix(in srgb, var(--c) 68%, transparent), color-mix(in srgb, color-mix(in srgb, var(--c) 86%, #000) 76%, transparent));
  -webkit-backdrop-filter: blur(10px) saturate(1.6); backdrop-filter: blur(10px) saturate(1.6);   /* frosted: colours show through, text does not */
  box-shadow: inset 0 2px 0 rgba(255,255,255,.7), inset 0 0 0 1.5px rgba(255,255,255,.3), inset 14px 0 24px -18px rgba(255,255,255,.85),
    inset 0 -18px 28px -22px rgba(255,255,255,.6), 0 18px 36px -20px color-mix(in srgb, var(--c) 70%, #000);
  text-shadow: 0 1px 2px color-mix(in srgb, var(--c) 50%, rgba(0,0,0,.35));
  transform-origin: 50% 100%;
  transition: transform .6s cubic-bezier(.3,1.3,.5,1), filter .4s;
}
.dc[data-slot="0"] { z-index: 3; transform: translate(0%, 0%) rotate(-2deg) scale(1); }
.dc[data-slot="1"] { z-index: 2; transform: translate(30%, -9%) rotate(4deg) scale(.96); }
.dc[data-slot="2"] { z-index: 1; transform: translate(60%, -18%) rotate(9deg) scale(.92); }
.deck:hover .dc[data-slot="0"] { transform: translate(0%, -4%) rotate(-3deg) scale(1.01); }
/* cards behind show only their top (label and picture); their big value and text fade out so nothing reads through the glass */
.dc .dc-foot, .dc .dc-d { transition: opacity .35s; }
.dc:not([data-slot="0"]) .dc-foot, .dc:not([data-slot="0"]) .dc-d { opacity: 0; }

/* card face: label + page on top, a frosted panel with the game's picture, a big value with a round arrow, one line under it */
.dc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dc-k { display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 3px; border-radius: 999px; min-width: 0;
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
  background: rgba(255,255,255,.2); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.18); }
.dc-k b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: color-mix(in srgb, var(--c) 80%, #000);
  font-size: 10px; font-weight: 700; letter-spacing: 0; text-shadow: none; }
.dc-n { font-size: 11px; font-weight: 600; opacity: .8; font-variant-numeric: tabular-nums; }
.dc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; }
.dc-big { min-width: 0; font: 500 clamp(18px, 6cqw, 28px)/1.05 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.dc-go { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: color-mix(in srgb, var(--c) 80%, #000);
  box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--c) 80%, #000); }
.dc-go svg { width: 16px; height: 16px; }
.dc-d { padding: 0 2px; font-size: 13px; line-height: 1.35; opacity: .92; }

/* the frosted panel that holds the game's picture */
.ms { position: relative; flex: none; height: 50%; overflow: hidden; border-radius: 18px; padding: 10px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #fff;
  background: linear-gradient(170deg, rgba(255,255,255,.26), rgba(255,255,255,.08)), color-mix(in srgb, color-mix(in srgb, var(--c) 70%, #000) 22%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 0 0 1px rgba(255,255,255,.2), inset 0 -10px 20px -14px rgba(0,0,0,.25); }

.m-strip { display: flex; gap: 6px; width: 92%; height: 64%; }
.m-strip i { flex: 1; border-radius: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 8px 18px -8px rgba(0,0,0,.5); }
.m-strip i:nth-child(odd) { transform: translateY(-6%); }
.m-sw { width: 82%; height: 72%; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -8px rgba(0,0,0,.6); }
.m-sl { width: 100%; display: grid; gap: 12px; }
.m-sl > span { display: flex; align-items: center; gap: 8px; }
.m-sl b { width: 10px; font-size: 10px; font-weight: 500; opacity: .6; }
.m-sl i { position: relative; flex: 1; height: 7px; border-radius: 999px; }
.m-sl u { position: absolute; top: 50%; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.55); }
.m-cmp { display: flex; width: 84%; height: 58%; border-radius: 12px; overflow: hidden; }
.m-cmp i { flex: 1; }
.m-row { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 11px; opacity: .85; }
.m-row em { font-style: normal; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(255,255,255,.14); }
.m-orb { position: relative; width: 58%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 45%), linear-gradient(0deg, color-mix(in srgb, var(--c) 90%, #fff) 0 48%, rgba(255,255,255,.06) 48%);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35), 0 0 30px color-mix(in srgb, var(--c) 60%, transparent); }
.m-orb .mk, .m-flash .mk { width: 22%; aspect-ratio: 219 / 384; height: auto; background: #fff; }
.m-ring { width: auto; height: 86%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(color-mix(in srgb, var(--c) 70%, #fff) var(--p), rgba(255,255,255,.12) 0); }
.m-ring b { width: 80%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 65%, #000); }
.m-ring .mk { width: 18%; aspect-ratio: 219 / 384; height: auto; background: #fff; }
.m-ring small, .m-big small { font-size: .5em; opacity: .6; margin-left: 2px; }
.m-bars { width: 100%; display: grid; gap: 12px; }
.m-bars > span { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 11px; }
.m-bars > span > span { opacity: .7; }
.m-bars i { grid-column: 1 / -1; order: 3; height: 8px; border-radius: 999px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff) var(--w), rgba(255,255,255,.12) var(--w)); }
.m-bars b { font-weight: 600; font-variant-numeric: tabular-nums; }
.m-eq { display: flex; align-items: flex-end; gap: 4%; width: 90%; height: 70%; }
.m-eq i { flex: 1; border-radius: 3px; background: linear-gradient(0deg, color-mix(in srgb, var(--c) 80%, #fff), rgba(255,255,255,.9)); }
.m-big { font: 500 clamp(26px, 9cqw, 40px)/1 var(--display); letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.m-big.s { font-size: clamp(20px, 6cqw, 28px); }
.m-line { position: relative; width: 86%; height: 4px; border-radius: 999px; background: rgba(255,255,255,.2); }
.m-line u { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; }
.m-wave { width: 100%; height: 44%; overflow: visible; }
.m-wave polyline { fill: none; stroke: color-mix(in srgb, var(--c) 60%, #fff); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c) 80%, transparent)); }
.m-field { position: absolute; inset: 0; }
.m-field .mk { position: absolute; width: 9px; height: 16px; background: color-mix(in srgb, var(--c) 55%, #fff); }
.m-flash { width: 74%; height: 76%; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 85%, #fff); box-shadow: 0 0 36px color-mix(in srgb, var(--c) 70%, transparent); }
.m-flash .mk { width: 18%; }
.m-step { display: flex; align-items: center; gap: 12px; }
.m-step i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 18px; background: rgba(255,255,255,.14); }
.m-step b { font: 500 34px/1 var(--display); min-width: 2ch; text-align: center; }
.m-net { width: 100%; height: 100%; }
.m-net line { stroke: rgba(255,255,255,.25); stroke-width: 1.4; }
.m-net line.on { stroke: color-mix(in srgb, var(--c) 60%, #fff); stroke-width: 2.6; }
.m-net text { fill: rgba(255,255,255,.7); font: 7px var(--body); text-anchor: middle; }
.m-net circle { fill: color-mix(in srgb, var(--c) 50%, #000); stroke: rgba(255,255,255,.5); stroke-width: 1.2; }
.m-net circle.on, .m-net circle.start { fill: color-mix(in srgb, var(--c) 60%, #fff); stroke: #fff; }
.m-net circle.goal { fill: none; stroke: #fff; stroke-dasharray: 2 2; }

@media (prefers-reduced-motion: reduce) { .dc { transition: none; } }
@media (max-width: 480px) { .gxc { border-radius: 30px; } }


/* categories on the home page */
.cat + .cat { margin-top: 8px; }
.cat { scroll-margin-top: 76px; }
.cat-head { display: grid; gap: 6px; padding: 0 var(--gutter) 22px; max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; }   /* the same edge as the cards below */
.cat-t { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(26px, 4vw, 36px); letter-spacing: -.03em; }
.cat-d { margin: 0; color: var(--muted); font-size: 15px; }
.cat-chaos .cat-t::after { content: ""; display: inline-block; width: .5em; height: .86em; margin-left: .28em; vertical-align: -.1em; rotate: 10deg;   /* an energy mark, as in the logo */
  background: linear-gradient(170deg, #7fcb9f, #3fae70); -webkit-mask: var(--bolt) center / contain no-repeat; mask: var(--bolt) center / contain no-repeat; }
/* ONE LIFE stack pictures */
.m-ray { display: grid; place-items: center; width: 70%; aspect-ratio: 4 / 3; border-radius: 16px; background: linear-gradient(165deg, #bfe6cf, #7fcb9f); box-shadow: inset 0 2px 0 rgba(255,255,255,.8); }
.m-ray .blob { width: 64%; height: auto; }
.m-rules { width: 92%; display: grid; gap: 5px; }
.m-rules i { display: flex; align-items: center; gap: 6px; }
.m-rules b { width: 14px; height: 14px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #16171b; font-size: 8px; font-style: normal; }
.m-rules u { height: 5px; width: var(--w); border-radius: 999px; background: rgba(255,255,255,.75); text-decoration: none; }
.m-banner { display: flex; align-items: center; gap: 8px; width: 92%; padding: 7px; border-radius: 999px; background: rgba(255,255,255,.9); }
.m-banner b { padding: 4px 7px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 8px; letter-spacing: .12em; }
.m-banner i { flex: 1; height: 5px; border-radius: 999px; background: #e5484d; opacity: .6; }

/* the categories right under the page title, so both are on screen as soon as the page opens */
.cat-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 580px; margin-top: 26px; }
.cat-pill { display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 12px; border-radius: 24px; text-decoration: none; color: var(--ink);
  background: linear-gradient(170deg, rgba(255,255,255,.9), rgba(255,255,255,.6)); box-shadow: var(--gl-rim), var(--gl-edge), 0 16px 32px -20px rgba(20,22,40,.3);
  transition: transform .25s cubic-bezier(.3,1.6,.5,1), box-shadow .3s; }
.cat-pill:hover { transform: translateY(-2px); box-shadow: var(--gl-rim), var(--gl-edge), 0 22px 40px -20px rgba(20,22,40,.38); }
.cp-ic { width: 48px; height: 48px; flex: none; display: flex; align-items: center; justify-content: center; gap: 1px; border-radius: 16px; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--k) 58%, #fff), color-mix(in srgb, var(--k) 80%, #fff));
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.42), inset 0 1.5px 2px rgba(255,255,255,.55), 0 0 0 1px rgba(255,255,255,.7), 0 10px 20px -10px color-mix(in srgb, var(--k) 70%, transparent); }
.cp-ic .mk { width: 6px; height: 11px; background: #fff; rotate: -20deg; }
.cp-ic .mk:nth-child(2) { width: 5px; height: 9px; rotate: 25deg; } .cp-ic .mk:nth-child(3) { width: 7px; height: 13px; rotate: 0deg; } .cp-ic .mk:nth-child(4) { width: 5px; height: 9px; rotate: -35deg; }
.cp-ray { background: linear-gradient(165deg, #bfe6cf, #7fcb9f); }
.cp-t { display: grid; gap: 2px; min-width: 0; }
.cp-t b { font-family: var(--display); font-weight: 500; font-size: 20px; letter-spacing: -.02em; line-height: 1.1; }
.cp-t small { font-size: 13px; color: var(--muted); }
.cp-go { margin-left: auto; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #16171b; color: #fff; font-size: 14px; }
.cp-t small { white-space: nowrap; }
@media (max-width: 480px) { .cat-pill { gap: 10px; padding: 10px 12px 10px 10px; border-radius: 20px; } .cp-ic { width: 40px; height: 40px; border-radius: 13px; } .cp-go { display: none; } .cp-t b { font-size: 18px; } }
@media (max-width: 330px) { .cat-nav { grid-template-columns: 1fr; } }

/* the sound pack menu opens over everything under it (the category buttons used to cover it) */
.gal-tools { position: relative; z-index: 30; }
.cat-nav { position: relative; z-index: 1; }
.page-head, .gal-head { position: relative; z-index: 5; }
.g-packmenu { z-index: 80; }
