/* 22PURSUIT — the game page (index.html): the 3D Sketch Gym (js/gym3d.js).
   Brand tokens (--brass, --cream, --brown-line …) come from css/styles.css. */
html, body { height: 100%; overflow: hidden; }
#gymStage { position: fixed; inset: 0; z-index: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
#gym { display: block; width: 100%; height: 100%; }
.g-vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 55%, rgba(11,8,5,0) 55%, rgba(5,3,1,.62)); }
.g-grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .35; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"); }

/* in-game HUD */
.g-ui { position: fixed; z-index: 3; pointer-events: none; font-family: "Space Mono", monospace; color: var(--cream); }
.g-stats { left: 22px; top: 74px; font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.g-stats b { color: var(--brass-hi); }
.g-title { left: 0; right: 0; top: 18px; text-align: center; }
.g-title .ex { font-family: "Bebas Neue", sans-serif; font-size: clamp(22px, 3.4vw, 34px); letter-spacing: .04em; color: var(--brass-hi); }
.g-title .hint { font-size: clamp(11px, 1.4vw, 14px); letter-spacing: .1em; color: rgba(246,214,120,.9); margin-top: 2px; }
.g-gauge { right: 22px; top: 24vh; width: 12px; height: 44vh; border: 2px solid rgba(199,154,84,.5); }
.g-gauge::before { content: "LOCK"; position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 700; color: rgba(230,185,106,.75); }
.g-gauge::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12%; background: rgba(230,185,106,.18); }
.g-gauge i { position: absolute; left: 0; right: 0; bottom: 0; background: var(--brass-hi); }
.g-gauge i.hot { background: #F6E49A; }
.g-flash { left: 0; right: 0; top: 14vh; text-align: center; font-family: "Bebas Neue", sans-serif; color: #F6E49A;
  font-size: clamp(34px, 6vw, 70px); letter-spacing: .03em; text-shadow: 0 6px 30px rgba(0,0,0,.8); opacity: 0; transition: opacity .15s; }

/* overlays: choose a lift / results */
.g-panel { position: fixed; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 16px 52px; text-align: center; pointer-events: none; }
.g-panel[hidden] { display: none; }
.g-panel > * { pointer-events: auto; }
.g-panel h1, .g-panel .g-big-title { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(52px, 9vw, 104px); line-height: .9; color: var(--cream);
  margin: 0; text-shadow: 0 8px 40px rgba(0,0,0,.9); pointer-events: none; }
.g-panel .lead { margin: 10px 0 22px; font-family: "Space Mono", monospace; font-size: clamp(11px, 1.5vw, 14px); letter-spacing: .22em;
  text-transform: uppercase; color: rgba(230,185,106,.92); text-shadow: 0 2px 14px rgba(0,0,0,.9); pointer-events: none; }
.g-panel .intro { max-width: 46ch; margin: -10px 0 20px; font-family: "DM Sans", sans-serif; font-size: clamp(13px, 1.5vw, 15px); line-height: 1.5;
  color: rgba(235,223,198,.82); text-shadow: 0 2px 14px rgba(0,0,0,.95); pointer-events: none; }
@media (max-height: 640px) { .g-panel .intro { display: none; } }   /* short screens: keep the lift cards in view */
.g-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 190px)); gap: 12px; }
@media (max-width: 860px) { .g-cards { grid-template-columns: repeat(2, minmax(0, 170px)); } }
.g-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 12px 14px; cursor: pointer;
  background: rgba(16,12,7,.86); border: 1px solid var(--brown-line); border-radius: 12px; color: var(--cream);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .2s, transform .2s, background .2s; font: inherit; }
.g-card:hover, .g-card:focus-visible, .g-card.sel { border-color: var(--brass); background: rgba(28,20,11,.92); transform: translateY(-3px); outline: none; }
.g-card .n { font-family: "Space Mono", monospace; font-size: 11px; color: var(--faint); }
.g-card b { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 30px; line-height: 1; color: var(--cream); }
.g-card .how { font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .14em; color: var(--brass-hi); }
.g-card .pr { font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: .06em; color: #CDBFA3; margin-top: 4px; }
.g-card .pr.none { color: var(--faint); }
.g-panel .sub { margin-top: 16px; font-family: "Space Mono", monospace; font-size: 11px; letter-spacing: .12em; color: rgba(230,185,106,.7); pointer-events: none; }
.g-box { display: flex; flex-direction: column; align-items: center; padding: 26px clamp(18px, 4vw, 40px) 20px; border-radius: 16px;
  background: rgba(11,8,5,.8); border: 1px solid var(--brown-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); }
.g-newpr { margin: 8px 0 4px; font-family: "Space Mono", monospace; font-weight: 700; font-size: clamp(12px, 1.7vw, 16px); letter-spacing: .24em; color: #1A1209;
  text-transform: uppercase; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); border-radius: 999px; padding: 7px 16px; box-shadow: 0 0 30px rgba(230,185,106,.5); }
.g-result { margin: 10px 0 2px; font-family: "Space Mono", monospace; font-size: clamp(12px, 1.6vw, 15px); letter-spacing: .12em; color: var(--cream); text-shadow: 0 2px 14px rgba(0,0,0,.9); }
.g-best { margin: 2px 0 20px; font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: .1em; color: rgba(230,185,106,.85); }
.g-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.g-actions button { font-family: "Space Mono", monospace; font-weight: 700; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  padding: 13px 20px; border-radius: 8px; cursor: pointer; }
.g-btn-solid { color: #1A1209; background: linear-gradient(180deg, var(--brass-hi), var(--brass)); border: 0; box-shadow: 0 10px 30px -8px rgba(230,185,106,.55); }
.g-btn-ghost { color: var(--cream); background: rgba(16,12,7,.86); border: 1px solid var(--brown-line); }
.g-btn-ghost:hover { border-color: var(--brass); }
.g-shop { display: inline-block; margin-top: 18px; font-family: "Space Mono", monospace; font-weight: 700; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brass-hi); text-decoration: none; padding: 6px 2px 3px; border-bottom: 1px solid rgba(230,185,106,.45); }
.g-shop:hover, .g-shop:focus-visible { color: var(--cream); border-color: var(--brass); }

/* share sheet */
.g-share { position: fixed; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(6,4,2,.8); }
.g-share[hidden] { display: none; }
.g-share-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.g-big { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px 12px; border-radius: 10px; border: 0; cursor: pointer;
  font-family: "Space Mono", monospace; font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  transition: filter .2s, transform .2s; }
.g-big svg { width: 22px; height: 22px; flex: none; }
.g-big.ig { background: linear-gradient(45deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%); }
.g-big.x { background: #000; border: 1px solid #3a3a3a; }
.g-big:hover, .g-big:focus-visible { filter: brightness(1.1); transform: translateY(-1px); outline: none; }
.g-more { margin: 18px 0 8px; font-family: "Space Mono", monospace; font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.g-share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.g-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 11px 4px 9px; border-radius: 10px; cursor: pointer;
  background: rgba(24,18,11,.9); border: 1px solid var(--brown-line); color: var(--cream);
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: .03em; transition: border-color .2s, color .2s; }
.g-tile svg { width: 22px; height: 22px; transition: color .2s; }
.g-tile:hover, .g-tile:focus-visible { border-color: var(--brass); outline: none; }
.g-tile:hover svg, .g-tile:focus-visible svg { color: var(--brand, var(--brass-hi)); }
.g-tile[hidden] { display: none; }
.g-share-box { position: relative; width: min(480px, 100%); max-height: 100%; overflow-y: auto; padding: 22px; border-radius: 14px;
  background: #140e08; border: 1px solid var(--brown-line); box-shadow: 0 30px 70px -30px rgba(0,0,0,.9); text-align: center; }
.g-share-box h2 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: 34px; color: var(--cream); margin: 0 0 12px; }
.g-share-box img { display: block; width: 100%; max-width: 230px; margin: 0 auto 16px; border-radius: 8px; border: 1px solid var(--brown-line); }
.g-share-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--brown-line);
  background: none; color: var(--cream); font-size: 20px; line-height: 1; cursor: pointer; }
.g-share .fine { margin: 12px 0 0; font-family: "Space Mono", monospace; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.g-share .note { min-height: 1.3em; margin-top: 8px; font-family: "Space Mono", monospace; font-size: 11px; color: var(--brass-hi); }

/* site links: Lobby (top-left, from styles.css), the store (top-right) and the legal pages (bottom) */
.enter-link { position: fixed; top: 16px; right: 16px; z-index: 5; font-family: "Space Mono", monospace; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brass-hi); background: rgba(20,15,9,.6); border: 1px solid #4A3620; border-radius: 20px; padding: 8px 14px;
  text-decoration: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: border-color .15s, color .15s; }
.enter-link:hover { border-color: var(--brass); color: var(--cream); }
.g-legal { position: fixed; z-index: 5; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 16px;
  font-family: "Space Mono", monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; pointer-events: none; }
.g-legal a { pointer-events: auto; color: var(--faint); text-decoration: none; }
.g-legal a:hover, .g-legal a:focus-visible { color: var(--brass-hi); }
.g-msg { position: fixed; inset: 0; display: grid; place-items: center; z-index: 7; padding: 24px; text-align: center; font-family: "Space Mono", monospace; color: var(--muted); }

/* keyboard hints are hidden on phones and tablets (no keyboard) */
@media (hover: none) and (pointer: coarse) { .kbd { display: none; } }

/* backup for devices without 3D: the 2D lift game (js/game.js) fills the screen */
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 2; cursor: pointer; touch-action: manipulation; }

@media (max-width: 560px) {
  .enter-link { font-size: 11px; padding: 7px 11px; }
  .g-title { top: 64px; }                 /* below the Lobby / store buttons */
  .g-stats { top: 122px; font-size: 12px; }
  .g-gauge { right: 12px; width: 10px; }
  .g-card b { font-size: 25px; }
  .g-legal { gap: 12px; }
}
