/*
 * The lobby's skin, shared by the two front doors: the public games area (public.html,
 * served at /) and the gated sandbox lobby (lobby.html, served at /sandbox). It was inline in
 * lobby.html until the public area arrived; two copies of a hundred lines of palette would have
 * drifted the moment either page was touched.
 */
  /* The portal's tokens (rails.js declares the same set for the in-game furniture). One
     palette for the lobby and the game, so walking from one to the other is not a jolt. */
  :root { color-scheme: dark;
    /* pontoonLayout.fig (2026-09-10): the cream, the near-blacks, the golds */
    --jb-ink:#e0d8ae; --jb-ink-dim:#d8dce5; --jb-ink-faint:#595e6b;
    --jb-panel-deep:#070810; --jb-ground:#01010d; --jb-edge:#6f7aa2; --jb-line-soft:#4a4e61;
    --jb-head:#e0d8ae; --jb-gold:#f3bb55; --jb-gold-soft:#e9b874; --jb-green:#2cd656; --jb-violet:#8382fe;
    --jb-danger:#e74446; --jb-r:12px; --jb-r-panel:12px; --jb-veil:.8;
    --jb-font:"Space Grotesk","Poppins",system-ui,-apple-system,"Segoe UI",sans-serif; }
  * { box-sizing: border-box; }
  body {
    margin: 0; min-height: 100vh; font: 15px/1.5 var(--jb-font);
    color: var(--jb-ink);
    /* The same backdrop and tint as the in-game pages: the casino floor under #432058 on
       multiply. Fixed, so it stays put behind a grid that scrolls. */
    background: #432058 url("/portal/1/siteBackground.webp") center center / cover no-repeat fixed;
    background-blend-mode: multiply;
    padding: 0 0 64px;
  }
  /* FIXED (Marc, 2026-09-08: "the top bar should not scroll, it should always be visible"). Above the
     rail (z 45) and everything else; the body carries its height as padding so nothing starts under
     it - rails.js's lobby mode measures the bar and sets that padding, since it also owns the rail's
     top edge and the two must agree. */
  .topbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    /* WHITE (Marc, 2026-09-10: "topbar should stay white"), dark ink, the ring's gold-brown for
       the live link - the money gold does not hold contrast on white */
    height: 70px; background: #fff; display: flex; align-items: center;
    padding: 0 clamp(16px, 4vw, 48px); gap: clamp(18px, 3vw, 40px);
  }
  .topbar .logo { margin-right: auto; display: flex; align-items: center; }
  .topbar .logo img { height: 54px; width: auto; display: block; }
  .topbar a {
    color: #1a1a2e; text-decoration: none; font-weight: 500; font-size: .95rem;
    letter-spacing: .3px; padding: 6px 2px; border-bottom: 2px solid transparent;
    transition: color .12s ease, border-color .12s ease;
  }
  .topbar a:hover { color: #8f5f28; border-bottom-color: #8f5f28; }
  /* Signed-in identity. It sits AFTER the nav links and does not push them: the logo already holds
     margin-right:auto, so this lands hard right on every width. */
  .topbar .who {
    display: inline-flex; align-items: center; gap: 7px;
    color: #1a1a2e; font-size: .9rem; font-weight: 500; white-space: nowrap;
  }
  .topbar .who .dot {
    width: 7px; height: 7px; border-radius: 50%; background: #2cd656;
    box-shadow: 0 0 0 3px rgba(44,214,86,.18);
  }
  .topbar a.active { color: #8f5f28; border-bottom-color: #8f5f28; }
  .wrap { max-width: 1000px; margin: 0 auto; padding: 20px 20px 0; }
  /* With the portal's left rail mounted (rails.js lobby mode adds .has-rail), the grid sits in the
     game zone: offset by the bands the rail publishes, so it can never sit under the widgets. */
  body.has-rail .wrap { max-width: none; margin: 0;
    padding-left: calc(var(--jb-rail-left, 0px) + 12px); padding-right: calc(var(--jb-rail-right, 0px) + 12px); }
  body.has-rail .grid { max-width: none; }
  .sub { text-align: center; color: var(--jb-ink-dim); font-size: .98rem; margin: 22px 0 30px; }
  .grid {
    max-width: 1000px; margin: 0 auto; display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .tile {
    position: relative; border: 0; padding: 0; cursor: pointer; text-align: left;
    border-radius: var(--jb-r); overflow: hidden; aspect-ratio: 1 / 1; color: inherit;
    background: rgb(3 7 14 / var(--jb-veil));
    /* The white hairline is a box-shadow ring rather than a border so it does not eat into
       the art, and the hover swaps it for the file's gold - the portal's live-state colour. */
    box-shadow: 0 0 0 1px var(--jb-edge), 0 10px 30px -12px rgba(0,0,0,.8);
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .tile:hover { transform: translateY(-4px);
    box-shadow: 0 0 0 2px var(--jb-gold), 0 0 22px rgba(243,187,85,.35), 0 16px 34px -12px rgba(0,0,0,.85); }
  .tile:active { transform: translateY(-1px); }
  .tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .tile .placeholder {
    width: 100%; height: 100%; display: grid; place-items: center; padding: 16px; text-align: center;
    font-weight: 800; font-size: 1.2rem; letter-spacing: .5px; color: var(--jb-ink);
    background: repeating-linear-gradient(135deg, #24170f 0 14px, #0f0c0a 14px 28px);
  }
  .tile .cap {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px;
    background: linear-gradient(0deg, rgba(1,1,13,.92), transparent);
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
  }
  .cap .name { font-weight: 700; }
  /* A tile the bundle ships carries its own name plate, so the caption would print the
     name twice, one on top of the other. The type pill still earns its place. */
  .tile.has-plate .cap .name { display: none; }
  .tile.has-plate .cap { justify-content: flex-end; }
  .cap .type { font-size: .68rem; text-transform: uppercase; letter-spacing: .6px; color: #1e1e1e;
    background: var(--jb-gold); border-radius: 100px; padding: 2px 8px; white-space: nowrap; }
  .state { text-align: center; color: var(--jb-ink-dim); padding: 40px; }
  .state.err { color: var(--jb-danger); }
  .foot { text-align: center; color: var(--jb-ink-dim); font-size: .8rem; margin-top: 40px; }
  .foot a { color: var(--jb-gold-soft); }
  .tile[aria-busy="true"] { opacity: .6; pointer-events: none; }
