/* Level 1 Games — Apricot Forest: fullscreen shell, wood-frame popups & game table,
   Memory Match, Syllable Match, Stinky Fish */

/* ===== wood frame (shared by launch banner, popups, game table) =====
   The painted log frame (ui/frame.webp) is drawn by ::after as a border-image
   overlay that slightly outsets the panel, so the art's irregular log edges
   overlap the inner panel with no gaps. Slice values are px of the 848x830
   source: top 192 (leaves) right 163 bottom 165 left 170. */
.g1-wood {
  position: relative;
  border-radius: 22px;
  padding: 30px;
  filter: drop-shadow(0 12px 22px rgba(16, 21, 39, .35));
}
.g1-wood::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 58px solid transparent;
  /* frame9 is a 9-slice prep of the painted frame: original corners, edges
     rebuilt as seamless tiles — "round" repeats them so grain never smears */
  border-image: url('../images/games/ui/frame9.webp') 192 163 165 170 round;
  pointer-events: none;
  z-index: 2;
}

/* hanging plaque title (painted wood board) */
.g1-plaque {
  position: relative;
  z-index: 3;
  margin: -30px auto 10px;
  width: max-content;
  max-width: 92%;
  background: url('../images/games/ui/plaque.webp') center / 100% 100% no-repeat;
  color: #fff;
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  padding: 14px 52px 16px;
  filter: drop-shadow(0 4px 8px rgba(16, 21, 39, .4));
  text-shadow: 0 2px 3px rgba(40, 18, 2, .55);
}

/* round X button (wood ring) */
.g1-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid #7a4720;
  background: radial-gradient(circle at 32% 28%, #f0b25a 0%, #DD8E44 55%, #c2732b 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(60, 30, 5, .35);
  transition: transform .12s ease;
}
.g1-x:hover { transform: scale(1.08); }
.g1-x svg { width: 20px; height: 20px; }

/* ===== chunky game buttons ===== */
.g1-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: transform .1s ease, filter .1s ease;
}
.g1-btn:active { transform: translateY(3px); box-shadow: none !important; }
.g1-btn-gold {
  background: linear-gradient(180deg, #FFC44F 0%, var(--gold, #F8A91E) 60%, #EB980D 100%);
  color: var(--navy, #101527);
  box-shadow: 0 4px 0 #C07F07;
}
.g1-btn-navy {
  background: linear-gradient(180deg, #2a3352 0%, var(--navy, #101527) 100%);
  color: #fff;
  box-shadow: 0 4px 0 #05070f;
}
.g1-btn-white {
  background: linear-gradient(180deg, #ffffff 0%, #eef1f4 100%);
  color: var(--navy, #101527);
  box-shadow: 0 4px 0 #c6ccd4;
}

/* big PLAY button */
.g1-play {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 14px 52px;
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 1px;
  color: var(--navy, #101527);
  background: linear-gradient(180deg, #FFD97E 0%, var(--gold, #F8A91E) 55%, #E89508 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .55), 0 5px 0 #B97710;
  cursor: pointer;
  transition: transform .1s ease;
}
.g1-play:hover { filter: brightness(1.05); }
.g1-play:active { transform: translateY(4px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), 0 1px 0 #B97710; }

/* ===== launch banner (in page) ===== */
.g1-launch { max-width: 860px; }
.g1-launch-inner {
  border-radius: 20px;
  background: linear-gradient(180deg, #DDF0E4 0%, #C6E6D1 100%);
  padding: 34px 28px 38px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(16, 21, 39, .25);
}
.g1-launch-deco { position: absolute; inset: auto 4px -14px auto; width: 170px; }
.g1-launch-deco svg, .g1-launch-deco img { width: 100%; display: block; }
.g1-launch-inner h3 {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 32px;
  margin: 0 0 8px;
  color: var(--navy, #101527);
}
.g1-launch-inner p { max-width: 520px; margin: 0 auto 16px; font-size: 15.5px; line-height: 1.6; color: var(--course-ink, #1f2733); }
.g1-launch-inner .g1-tally { margin-bottom: 20px; }
.g1-launch-inner .g1-play { display: block; margin: 0 auto; position: relative; z-index: 1; }

.g1-tally {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--navy, #101527);
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 16px;
}
.g1-tally svg { width: 18px; height: 18px; fill: var(--gold, #F8A91E); }

/* ===== fullscreen shell ===== */
.g1-fs {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background:
    url('../images/games/ui/backdrop.jpg') center / cover no-repeat,
    linear-gradient(180deg, #14333c 0%, #1c4a4a 100%);
}
.g1-fs-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  flex: 0 0 auto;
}
.g1-fs-title {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.g1-fs-head .g1-tally { margin-left: auto; }
.g1-fs-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px 20px 34px;
}
.g1-fs-body .g1-view { max-width: 1160px; margin: 0 auto; }

/* map sized to fit the viewport on desktop */
.g1-fs .g1-map-art-desk {
  width: min(100%, calc((100vh - 170px) * 1.435));
  margin: 0 auto;
}
.g1-fs-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.g1-fs::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(16, 21, 39, .35) 0%, rgba(16, 21, 39, .15) 30%, rgba(16, 21, 39, .45) 100%);
}
.g1-fs-head, .g1-fs-body { position: relative; z-index: 2; }

/* ===== forest map ===== */
.g1-map {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #DDF0E4 0%, #CBE8D5 55%, #BCE0C8 100%);
  box-shadow: 0 6px 24px rgba(16, 21, 39, .30);
  max-width: 1100px;
}
/* painted map art: the trail is in the artwork */
.g1-map-art-desk {
  aspect-ratio: 2200 / 1533;
  background: url('../images/games/ui/map-desk.jpg') center / cover no-repeat;
}
.g1-map-art-mob {
  aspect-ratio: 704 / 1696;
  background: url('../images/games/ui/map-mob.jpg') center / cover no-repeat;
}
/* the desktop trail recedes to the horizon: labels off, numbers scale with the bubble */
.g1-map-art .g1-node-label { display: none; }
.g1-node { container-type: inline-size; }
.g1-node strong { font-size: 45cqw; }

.g1-node {
  position: absolute;
  transform: translate(-50%, -50%);
  aspect-ratio: 1 / 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.g1-node-face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 32% 26%, #4aa3a2 0%, var(--teal, #308382) 55%, #23615f 100%);
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, .14);
  border: 4px solid #fff;
  transition: transform .14s ease;
}
.g1-node-face::after {
  content: '';
  position: absolute;
  top: 9%;
  left: 16%;
  width: 42%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  transform: rotate(-18deg);
}
.g1-node:hover .g1-node-face { transform: scale(1.07); }
.g1-node strong {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  color: #fff;
  font-size: clamp(22px, 3.4vw, 44px);
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.g1-node-ico { display: flex; width: 42%; height: 42%; color: rgba(255, 255, 255, .95); }
.g1-node-ico svg { width: 100%; height: 100%; }

.g1-node .g1-stars {
  position: absolute;
  left: 50%;
  bottom: -9%;
  transform: translateX(-50%);
  display: flex;
  gap: 2%;
  width: 96%;
  justify-content: center;
  pointer-events: none;
}
.g1-node .g1-stars i { width: 30%; aspect-ratio: 1/1; display: block; }
.g1-node .g1-stars i:nth-child(2) { margin-top: 6%; }
.g1-node .g1-stars svg { width: 100%; height: 100%; fill: #ffffff; opacity: .55; filter: drop-shadow(0 2px 2px rgba(16,21,39,.3)); }
.g1-node .g1-stars i.lit svg { fill: var(--gold, #F8A91E); opacity: 1; stroke: #B97710; stroke-width: 1.4; }

.g1-node-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 108%;
  white-space: nowrap;
  font-size: clamp(10px, 1.2vw, 13px);
  font-weight: 700;
  color: var(--navy, #101527);
  background: rgba(255, 255, 255, .85);
  border-radius: 999px;
  padding: 2px 10px;
  pointer-events: none;
}

.g1-node.current .g1-node-face {
  background: radial-gradient(circle at 32% 26%, #FFC44F 0%, var(--gold, #F8A91E) 55%, #D88B0A 100%);
}
.g1-node.current strong { color: var(--navy, #101527); text-shadow: none; }

.g1-mapfoot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 12px auto 0;
}
.g1-fs .g1-mapfoot { width: min(100%, calc((100vh - 170px) * 1.435)); }
.g1-maphint { font-size: 13.5px; color: rgba(255, 255, 255, .85); font-weight: 500; }
.g1-resetlink {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
}
.g1-resetlink:hover { color: #fff; }

.g1-toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translate(-50%, 20px);
  background: var(--navy, #101527);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  border-radius: 999px;
  padding: 12px 24px;
  box-shadow: 0 8px 24px rgba(16, 21, 39, .35);
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9300;
  pointer-events: none;
}
.g1-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== level start popup ===== */
.g1-pop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(16, 21, 39, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 20px;
  overflow-y: auto;
}
.g1-pop {
  width: min(480px, 100%);
  margin: auto;
  animation: g1popin .3s cubic-bezier(.3, 1.4, .6, 1);
}
@keyframes g1popin {
  from { transform: scale(.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.g1-pop-x { position: absolute; top: -16px; right: -12px; z-index: 3; }
.g1-pop-inner {
  border-radius: 16px;
  background: #FDF3E3;
  padding: 20px 22px 26px;
  text-align: center;
}
.g1-pop-inner .g1-gametag { margin-bottom: 8px; }
.g1-stars-pop { display: flex; justify-content: center; gap: 6px; margin: 6px 0 2px; }
.g1-stars-pop i { width: 34px; height: 34px; display: block; }
.g1-stars-pop i:nth-child(2) { margin-top: 8px; }
.g1-stars-pop svg { width: 100%; height: 100%; fill: rgba(16, 21, 39, .15); }
.g1-stars-pop i.lit svg { fill: var(--gold, #F8A91E); stroke: #B97710; stroke-width: 1.3; }
.g1-pop-dir { font-size: 15px; line-height: 1.6; margin: 10px auto 16px; max-width: 380px; color: var(--course-ink, #1f2733); }
.g1-pop .g1-play { margin-top: 6px; }

.g1-optrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.g1-optlabel {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy, #101527);
  min-width: 62px;
  text-align: right;
}
.g1-seg {
  display: inline-flex;
  background: #fff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(16, 21, 39, .12);
  overflow: hidden;
}
.g1-segbtn {
  border: 0;
  background: transparent;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy, #101527);
  cursor: pointer;
}
.g1-segbtn.on { background: var(--teal, #308382); color: #fff; }

/* ===== game view ===== */
.g1-gamehead { display: flex; align-items: center; gap: 14px; margin: 4px 0 14px; flex-wrap: wrap; }
.g1-gamehead h3 {
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: 26px;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.g1-gametag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
}
.g1-tag-memory.g1-gametag   { background: var(--teal, #308382); color: #fff; }
.g1-tag-syllable.g1-gametag { background: var(--gold, #F8A91E); color: var(--navy, #101527); }
.g1-tag-fish.g1-gametag     { background: var(--navy, #101527); color: #fff; }
.g1-tag-review.g1-gametag   { background: #DD8E44; color: #fff; }

.g1-controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 14px; }

.g1-key {
  background: #FDF3E3;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(16, 21, 39, .2);
  padding: 12px 16px;
  font-size: 14.5px;
  margin: 0 0 14px;
  max-width: 860px;
}

/* game table (plain panel — the wood frame is popups-only) */
.g1-table { margin: 0 0 18px; }
.g1-table-inner {
  border-radius: 20px;
  background: linear-gradient(180deg, #E7F3E9 0%, #D8ECDD 100%);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(16, 21, 39, .30);
}

.g1-status { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.g1-pill {
  display: inline-block;
  background: #fff;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--navy, #101527);
  box-shadow: 0 2px 8px rgba(16, 21, 39, .10);
}
.g1-pill.turn { background: var(--navy, #101527); color: #fff; }

/* ===== cards (big on desktop) ===== */
.g1-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.g1-grid-big { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }
.g1-grid-syl { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

.g1-card {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 5 / 7;
  perspective: 700px;
  -webkit-tap-highlight-color: transparent;
}
.g1-card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.4, .1, .2, 1);
}
.g1-card.flip .g1-card-inner { transform: rotateY(180deg); }
.g1-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(16, 21, 39, .18);
}
.g1-back { background: #DD8E44 center / cover no-repeat; }
.g1-back::after {
  content: '';
  width: 46%;
  height: 46%;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
/* painted back designs — one is dealt per round (pickBack in JS) */
.g1-back-1, .g1-back-2, .g1-back-3, .g1-back-4 { background-color: #E8D5B0; }
.g1-back-1 { background-image: url('../images/games/ui/back1.webp'); }
.g1-back-2 { background-image: url('../images/games/ui/back2.webp'); }
.g1-back-3 { background-image: url('../images/games/ui/back3.webp'); }
.g1-back-4 { background-image: url('../images/games/ui/back4.webp'); }
.g1-back-1::after, .g1-back-2::after, .g1-back-3::after, .g1-back-4::after { display: none; }
.g1-front { transform: rotateY(180deg); }
.g1-pic { background: #fff; padding: 8%; }
.g1-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.g1-word { background: var(--teal, #308382); }
.g1-word span {
  color: #fff;
  font-family: 'Roboto Slab', serif;
  font-weight: 700;
  font-size: clamp(19px, 2.6vw, 34px);
  letter-spacing: .5px;
}
.g1-syl.alt { background: #DD8E44; }
.g1-fishcard { background: var(--teal, #308382); padding: 6%; }
.g1-fishcard img { border-radius: 8px; }

.g1-card.won { pointer-events: none; }
.g1-card.won .g1-face { box-shadow: 0 0 0 4px var(--gold, #F8A91E), 0 3px 10px rgba(16, 21, 39, .18); }
.g1-card.won .g1-card-inner { animation: g1pop .5s ease; }
@keyframes g1pop {
  0% { transform: rotateY(180deg) scale(1); }
  50% { transform: rotateY(180deg) scale(1.08); }
  100% { transform: rotateY(180deg) scale(1); }
}
.g1-card.sel .g1-face { box-shadow: 0 0 0 4px var(--navy, #101527), 0 3px 10px rgba(16, 21, 39, .18); }
.g1-card.nope .g1-card-inner { animation: g1shake .4s ease; }
@keyframes g1shake {
  0%, 100% { translate: 0 0; }
  25% { translate: -5px 0; }
  75% { translate: 5px 0; }
}
.g1-card:focus-visible .g1-face { outline: 3px solid var(--gold, #F8A91E); outline-offset: 2px; }
.g1-node:focus-visible .g1-node-face { outline: 3px solid var(--gold, #F8A91E); outline-offset: 3px; }

/* ===== built words / piles ===== */
.g1-built { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.g1-wordchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--navy, #101527);
  color: #fff;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 15px;
}
.g1-wordchip b { font-family: 'Roboto Slab', serif; font-weight: 700; }
.g1-wordchip i { font-style: normal; color: var(--gold, #F8A91E); }

/* ===== stinky fish zones ===== */
.g1-zone {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 3px 12px rgba(16, 21, 39, .10);
  padding: 16px 18px;
  margin: 0 0 14px;
}
.g1-zone-you { background: #FDF3E3; }
.g1-zonelabel { font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 15px; color: var(--navy, #101527); margin-bottom: 10px; }
.g1-hand { display: flex; flex-wrap: wrap; gap: 10px; }
.g1-card-hand { width: 92px; aspect-ratio: 5 / 7; flex: 0 0 auto; }
.g1-fishnote {
  min-height: 26px;
  font-size: 15.5px;
  font-weight: 500;
  color: var(--navy, #101527);
  margin: 0 0 14px;
  padding: 0 4px;
}
.g1-fishnote b { color: var(--teal, #308382); }

/* ===== review grid ===== */
.g1-reviewgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}
.g1-reviewbtn {
  border: 0;
  border-radius: 14px;
  padding: 18px 12px 14px;
  cursor: pointer;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 0 rgba(16, 21, 39, .35);
  transition: transform .12s ease;
}
.g1-reviewbtn:hover { transform: translateY(-2px); }
.g1-reviewbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(16, 21, 39, .35); }
.g1-reviewbtn.g1-tag-memory { background: linear-gradient(180deg, #3a9c9b 0%, var(--teal, #308382) 100%); }
.g1-reviewbtn.g1-tag-syllable { background: linear-gradient(180deg, #FFC44F 0%, var(--gold, #F8A91E) 100%); color: var(--navy, #101527); }
.g1-reviewbtn.g1-tag-fish { background: linear-gradient(180deg, #2a3352 0%, var(--navy, #101527) 100%); }
.g1-reviewbtn strong { display: block; font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 18px; }
.g1-reviewbtn span { display: block; font-size: 13px; font-weight: 700; margin: 3px 0 6px; opacity: .9; }
.g1-reviewbtn .g1-stars { display: inline-flex; gap: 3px; }
.g1-reviewbtn .g1-stars i { width: 16px; height: 16px; display: block; }
.g1-reviewbtn .g1-stars svg { width: 100%; height: 100%; fill: rgba(255, 255, 255, .45); }
.g1-reviewbtn .g1-stars i.lit svg { fill: var(--gold, #F8A91E); }
.g1-reviewbtn.g1-tag-syllable .g1-stars svg { fill: rgba(16, 21, 39, .25); }
.g1-reviewbtn.g1-tag-syllable .g1-stars i.lit svg { fill: #fff; }

/* ===== win banner, stars & confetti ===== */
.g1-win {
  margin-top: 20px;
  background: linear-gradient(180deg, #FFC44F 0%, var(--gold, #F8A91E) 100%);
  color: var(--navy, #101527);
  border-radius: 16px;
  padding: 24px 24px 22px;
  text-align: center;
  max-width: 760px;
  box-shadow: 0 8px 20px rgba(16, 21, 39, .25);
}
.g1-win.sad { background: linear-gradient(180deg, #2a3352 0%, var(--navy, #101527) 100%); color: #fff; }
.g1-win p { margin: 0 0 14px; font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 21px; }
.g1-winrow { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.g1-stars-big { display: inline-flex; gap: 8px; margin: 0 0 10px; }
.g1-stars-big i { width: 46px; height: 46px; display: block; }
.g1-stars-big i:nth-child(2) { margin-top: 10px; }
.g1-stars-big svg { width: 100%; height: 100%; fill: rgba(16, 21, 39, .18); }
.g1-stars-big i.lit svg { fill: #fff; stroke: #B97710; stroke-width: 1.2; filter: drop-shadow(0 3px 3px rgba(16, 21, 39, .25)); }
.g1-stars-big i.lit { animation: g1starin .45s ease backwards; }
.g1-stars-big i.lit:nth-child(2) { animation-delay: .18s; }
.g1-stars-big i.lit:nth-child(3) { animation-delay: .36s; }
@keyframes g1starin {
  from { transform: scale(0) rotate(-40deg); }
  60% { transform: scale(1.25) rotate(6deg); }
  to { transform: scale(1) rotate(0); }
}

.g1-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 9200; overflow: hidden; }
.g1-confetti span {
  position: absolute;
  top: -20px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  animation: g1fall linear forwards;
}
@keyframes g1fall {
  to { transform: translateY(105vh) rotate(540deg); opacity: .9; }
}

@media (max-width: 640px) {
  /* The course topbar's nowrap content forces the mobile layout viewport to
     ~570px on course pages; let it shrink so this page lays out at true
     device width (matters for the fullscreen game + popups). */
  .course-topbar { min-width: 0; }
  .course-topbar .tb-progress { display: none; }
  .course-topbar .tb-brandwrap { min-width: 0; flex-shrink: 1; }
  .course-topbar .tb-brandname { overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }

  .g1-fs-head { padding: 10px 12px; gap: 10px; }
  .g1-fs-body { padding: 6px 12px 26px; }
  .g1-fs .g1-map-art-desk, .g1-fs .g1-mapfoot { width: 100%; }
  .g1-launch-inner h3 { font-size: 25px; }
  .g1-launch-deco { width: 100px; }
  .g1-grid, .g1-grid-big { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .g1-grid-syl { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .g1-table-inner { padding: 12px; }
  .g1-card-hand { width: 58px; }
  .g1-gamehead h3 { font-size: 22px; }
  .g1-node-label { display: none; }
  .g1-plaque { font-size: 18px; padding: 11px 38px 13px; }
  .g1-pop-x { right: -6px; }
  .g1-x { width: 40px; height: 40px; }
  .g1-wood { padding: 20px; }
  .g1-wood::after { inset: -6px; border-width: 40px; }
}
