/*! CaptiFi game kit scenes 1.0.0: styles for CaptifiScenes.mount(). No images, no web fonts.
   Every colour is a --cgs-* custom property the script sets from the venue's accent (and the
   scene's own fixed paper, kraft and wood tones), so nothing here names a colour. Flat textured
   scenes: one soft shadow under each object, no gradient, glow or bevel. */

.cgs {
  --cgs-font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  color: var(--cgs-ink);
  font-family: var(--cgs-font);
  font-size: 16px;
  line-height: 1.3;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
.cgs *, .cgs *::before, .cgs *::after { box-sizing: border-box; }
.cgs [hidden] { display: none !important; }
.cgs button { font-family: inherit; }
.cgs svg { display: block; overflow: visible; }
.cgs svg text { font-family: var(--cgs-font); }
.cgs :focus { outline: 3px solid var(--cgs-accent); outline-offset: 3px; }
.cgs :focus:not(:focus-visible) { outline: none; }
.cgs-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The title row: the look's title when there is one, the speaker button (a 44 px target, a 36 px disc) in its corner. */
.cgs-head { position: relative; min-height: 44px; padding: 0 48px; }
.cgs-title { margin: 0; padding-top: 9px; font-size: 22px; font-weight: 700; line-height: 1.2; }
.cgs-mute { position: absolute; top: 0; right: 0; width: 44px; height: 44px; display: grid; place-items: center; padding: 4px; border: 0; border-radius: 50%; cursor: pointer; color: var(--cgs-on-tint); background: var(--cgs-tint); background-clip: content-box; }
.cgs-mute svg { width: 18px; height: 18px; }
.cgs-mute[aria-pressed="true"] { color: var(--cgs-on-shade); background-color: var(--cgs-shade); }

.cgs-art { position: relative; width: 100%; margin: 6px auto 0; }
.cgs-foot { margin-top: 14px; }
.cgs-ctas { display: flex; flex-direction: column; gap: 10px; }
.cgs-lines { display: flex; flex-direction: column; gap: 4px; }
.cgs-hint { margin: 0; font-size: 14px; line-height: 1.4; color: var(--cgs-ink); opacity: .78; }
.cgs-pill { margin: 0; padding: 12px 16px; border-radius: 12px; font-weight: 700; color: var(--cgs-on-tint); background: var(--cgs-tint); }
.cgs-btn { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-height: 48px; padding: 14px 16px; border: 0; border-radius: 12px; cursor: pointer; font: 700 16px/1.3 var(--cgs-font); color: var(--cgs-on-accent); background: var(--cgs-accent); touch-action: manipulation; }
.cgs-btn[aria-disabled="true"] { cursor: default; color: var(--cgs-on-mute); background: var(--cgs-mute); }
/* "Show my result now": a plain text button, 44 px tall, on screen throughout a skill game. */
.cgs-skip { -webkit-appearance: none; appearance: none; display: block; margin: 0 auto; min-height: 44px; padding: 10px 14px; border: 0; background: none; cursor: pointer; font: 500 14px/1.3 var(--cgs-font); color: var(--cgs-ink); opacity: .8; text-decoration: underline; text-underline-offset: 3px; }
.cgs-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--cgs-deep); }
.cgs-ctas > .cgs-kicker { margin: 0; font-size: 14px; color: var(--cgs-ink); }
.cgs-res { padding: 16px; border-radius: 14px; background: var(--cgs-tint); }
.cgs-res-title { font-size: 22px; font-weight: 700; line-height: 1.2; color: var(--cgs-title); }
.cgs-res--lose .cgs-res-title { color: var(--cgs-deep); }
.cgs-res-prize, .cgs-res-note { margin: 4px 0 0; font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--cgs-ink); }
.cgs-res-note { font-size: 15px; opacity: .85; }
.cgs-err { margin: 10px 0 0; font-size: 15px; color: var(--cgs-ink); }
.cgs-ic { display: block; width: 1em; height: 1em; fill: currentColor; }

/* The stats pills over the scene: tint, the time and the count. */
.cgs-stats { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 0 10px; }
.cgs-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; color: var(--cgs-on-tint); background: var(--cgs-tint); font: 700 14px/1 var(--cgs-font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cgs-chip .cgs-ic { width: 16px; height: 16px; }
/* The in-art card: white, 12 px corners, one shadow, the prize's glyph over its short label. */
.cgs-card { position: absolute; left: 50%; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 132px; max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; transform: translateX(-50%); overflow-wrap: anywhere; color: var(--cgs-deep); background: var(--cgs-paper); box-shadow: 0 8px 16px var(--cgs-shadow); font: 700 14px/1.2 var(--cgs-font); pointer-events: none; }
.cgs-card .cgs-ic { width: 30px; height: 30px; color: var(--cgs-accent); }
.cgs-card.is-lose .cgs-ic { color: var(--cgs-deep); }

/* Penalty: the pitch, and four 48 px corner targets over it. */
.cgs-pk { position: relative; touch-action: none; }
.cgs-pk-art { width: 100%; filter: drop-shadow(0 10px 20px var(--cgs-shadow)); }
.cgs-pk-tbtn { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.cgs-pk-tbtn[aria-disabled="true"] { cursor: default; }

/* Jigsaw: the wooden table, the cream mat, the kraft tray and pieces with a thin cardboard edge. */
.cgs-jg { position: relative; width: 100%; overflow: hidden; border-radius: 16px; touch-action: none; box-shadow: 0 10px 20px var(--cgs-shadow); }
.cgs-jg-table { position: absolute; left: 0; top: 0; }
.cgs-jg-board { position: absolute; border-radius: 12px; box-shadow: 0 0 0 5px var(--cgs-mat); }
.cgs-jg-board > svg { width: 100%; height: 100%; filter: drop-shadow(0 4px 8px var(--cgs-wood)); }
.cgs-jg-sq { position: absolute; padding: 0; border: 0; border-radius: 8px; background: transparent; pointer-events: none; }
.cgs-jg-sq.is-armed { pointer-events: auto; cursor: pointer; }
.cgs-jg-tray { position: absolute; display: grid; place-items: center; overflow: hidden; border: 1.5px solid var(--cgs-kraft); border-radius: 12px; box-shadow: 0 3px 6px var(--cgs-wood); }
.cgs-jg-tray > svg { position: absolute; left: 0; top: 0; }
.cgs-jg-note { position: relative; font-size: 14px; font-weight: 600; color: var(--cgs-kraft-ink); }
.cgs-jg-piece { position: absolute; left: 0; top: 0; z-index: 2; transform-origin: 0 0; cursor: grab; filter: drop-shadow(0 3px 4px var(--cgs-wood)); will-change: transform; }
.cgs-jg-piece svg { width: 100%; height: 100%; }
.cgs-jg-piece.is-off { visibility: hidden; }
.cgs-jg-piece.is-placed { z-index: 1; filter: none; cursor: default; pointer-events: none; }
.cgs-jg-piece.is-lift { filter: drop-shadow(0 10px 14px var(--cgs-shadow)); cursor: grabbing; }
.cgs-jg-piece.is-sel { z-index: 40; filter: drop-shadow(0 6px 10px var(--cgs-shadow)); }

/* Memory: a felt card table with a flat speckle and a stitched edge; playing cards on it. Corners
   concentric: 9 px card, 4 px border, 5 px inside. */
.cgs-mm { position: relative; padding: 16px; overflow: hidden; border-radius: 16px; box-shadow: 0 10px 20px var(--cgs-shadow); }
.cgs-mm-felt { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.cgs-mm-stitch { position: absolute; left: 6px; top: 6px; right: 6px; bottom: 6px; border: 1.5px dashed; border-radius: 10px; pointer-events: none; }
.cgs-mm-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cgs-mm-card { -webkit-appearance: none; appearance: none; position: relative; display: block; width: 100%; height: 92px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; color: inherit; }
.cgs-mm-card:focus { outline-color: var(--cgs-paper); }
.cgs-mm-card[aria-disabled="true"] { cursor: default; }
.cgs-mm-in { position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 9px; box-shadow: 0 3px 6px var(--cgs-drop); }
.cgs-mm-back, .cgs-mm-face { position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: 9px; background: var(--cgs-paper); }
.cgs-mm-back { padding: 4px; }
.cgs-mm-lat { position: relative; display: grid; place-items: center; width: 100%; height: 100%; overflow: hidden; border-radius: 5px; background: var(--cgs-accent); }
.cgs-mm-lat > svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.cgs-mm-medal { position: relative; display: grid; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; color: var(--cgs-on-surface); background: var(--cgs-paper); font-size: 18px; font-weight: 700; }
.cgs-mm-medal img { width: 26px; height: 26px; object-fit: contain; }
.cgs-mm-medal .cgs-ic { width: 22px; height: 22px; }
.cgs-mm-ad { position: absolute; left: 6px; top: 6px; right: 6px; bottom: 6px; overflow: hidden; border-radius: 3px; }
.cgs-mm-ad img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.cgs-mm-face { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; color: var(--cgs-deep); }
.cgs-mm-face::before { content: ""; position: absolute; left: 4px; top: 4px; right: 4px; bottom: 4px; border: 1px solid var(--cgs-rule); border-radius: 5px; }
.cgs-mm-big { width: 30px; height: 30px; color: var(--cgs-accent); }
.cgs-mm-pip { position: absolute; left: 7px; top: 7px; color: var(--cgs-accent); }
.cgs-mm-pip .cgs-ic { width: 12px; height: 12px; }
.cgs-mm-pip--end { left: auto; top: auto; right: 7px; bottom: 7px; transform: rotate(180deg); }
.cgs-mm-name { position: relative; font-size: 12px; font-weight: 700; line-height: 1.2; }
.cgs-mm-card.is-up .cgs-mm-back { display: none; }
.cgs-mm-card.is-up .cgs-mm-face { display: flex; }
.cgs-mm-card.is-matched .cgs-mm-face { background: var(--cgs-tint); }
.cgs-mm-card.is-matched .cgs-mm-face::before { border-color: var(--cgs-mute); }

/* Breakout: the brick wall and the sky; under reduced motion each brick is a button. */
.cgs-bo { position: relative; touch-action: none; border-radius: 16px; cursor: ew-resize; }
.cgs[data-rm] .cgs-bo { cursor: default; }
.cgs-bo-art { width: 100%; filter: drop-shadow(0 10px 20px var(--cgs-shadow)); }
.cgs-bo-b { transform-box: fill-box; }
.cgs-bo-bbtn { position: absolute; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; }
