.gr-page {
  --gr-blue: #2b56d9;
  --gr-blue-d: #1a3a9e;
  --gr-blue-l: #7cc4ff;
  --gr-sky: #c4e8ff;
  --gr-red: #e8283c;
  --gr-red-d: #a5111f;
  --gr-ink: #14214a;
  --gr-ring: #fff;
  max-width: 30rem;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  color: var(--gr-ink);
  background-color: #ffe95c;
  background-image: radial-gradient(#ffd83a 24%, transparent 26%);
  background-size: 13px 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .25);
}
.gr-page *, .gr-page *::before, .gr-page *::after { box-sizing: border-box; }

.gr-deco { position: absolute; inset: 0 0 auto; height: 40rem; pointer-events: none; z-index: 0; }
.gr-deco i { position: absolute; font-style: normal; font-size: 1.25rem; transform: rotate(var(--r)); filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .15)); }

/* ---------- top bar ---------- */
.gr-top { position: relative; z-index: 2; display: flex; align-items: center; gap: .45rem; padding: .6rem .75rem 0; }
.gr-back {
  width: 1.9rem;
  height: 1.9rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gr-ink);
  color: var(--gr-ink);
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}
.gr-round { flex: 1; min-width: 0; white-space: nowrap; color: var(--gr-red); font-weight: 900; font-size: clamp(.95rem, 4.6vw, 1.2rem); letter-spacing: -.01em; }
.gr-round b { font-variant-numeric: tabular-nums; }
.gr-pill {
  padding: .2rem .75rem;
  border-radius: 999px;
  border: 2px solid var(--gr-ink);
  background: #fff;
  color: var(--gr-ink);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}

.gr-full {
  flex: none;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--gr-ink);
  background: #fff;
  cursor: pointer;
}
.gr-full svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: var(--gr-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gr-full .off, .gr-page.is-full .gr-full .on { display: none; }
.gr-page.is-full .gr-full .off { display: inline; }

.gr-page.is-full {
  position: fixed;
  inset: 0;
  z-index: 9999;
  max-width: none;
  margin: 0;
  border-radius: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-top: env(safe-area-inset-top, 0px);
}
.gr-page.is-full { display: flex; flex-direction: column; }
.gr-page.is-full > :not(.gr-deco):not(.gr-sheet):not(.gr-pop):not(.gr-toast) { width: 100%; max-width: 30rem; margin-left: auto; margin-right: auto; flex: none; }
.gr-page.is-full > .gr-panel { flex: 1 0 auto; }
.gr-page:fullscreen { max-width: none; width: 100%; height: 100%; border-radius: 0; overflow-y: auto; }
html.gr-lock-scroll, html.gr-lock-scroll body { overflow: hidden; }
.gr-page.is-full .gr-sheet, .gr-page.is-full .gr-pop { position: fixed; }

/* ---------- ferris wheel ---------- */
.gr-stage { position: relative; z-index: 1; padding: .9rem .5rem 0; }
.gr-wheel { position: relative; width: 100%; max-width: 27rem; aspect-ratio: 1; margin: 0 auto; }

.gr-stand { position: absolute; left: 50%; top: 50%; width: 0; height: 64%; z-index: 0; }
.gr-stand i {
  position: absolute;
  top: 0;
  left: -1.5rem;
  width: 3rem;
  height: 100%;
  transform-origin: 50% 0;
  background: repeating-linear-gradient(115deg, var(--gr-blue-l) 0 14px, #4f9df3 14px 22px);
  border: 3px solid var(--gr-blue-d);
  border-top: 0;
}
.gr-stand i:first-child { transform: rotate(21deg); }
.gr-stand i:nth-child(2) { transform: rotate(-21deg); }
.gr-stand b {
  position: absolute;
  top: 58%;
  left: -3.6rem;
  width: 7.2rem;
  height: .9rem;
  background: #4f9df3;
  border: 3px solid var(--gr-blue-d);
  border-radius: .3rem;
}

.gr-spoke {
  position: absolute;
  left: 50%;
  top: 50%;
  width: .8rem;
  height: 36%;
  margin-left: -.4rem;
  z-index: 1;
  transform-origin: 50% 0;
  transform: rotate(calc(var(--a) + 180deg));
  background:
    radial-gradient(circle, #fff 0 .17rem, var(--gr-blue-d) .18rem .26rem, transparent .27rem) 50% 72% / 100% .8rem no-repeat,
    linear-gradient(90deg, var(--gr-blue-d) 0 .14rem, #4f8ff0 .14rem calc(100% - .14rem), var(--gr-blue-d) calc(100% - .14rem));
}

.gr-item {
  position: absolute;
  z-index: 2;
  width: 23%;
  height: 23%;
  padding: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: clamp(.22rem, 1.2vw, .4rem) solid var(--gr-blue);
  background: #fff;
  container-type: size;
  cursor: pointer;
  font: inherit;
  color: var(--gr-ink);
  box-shadow: 0 0 0 2px var(--gr-blue-d), inset 0 0 0 2px var(--gr-blue-d);
  transition: border-color .1s, box-shadow .1s;
  -webkit-tap-highlight-color: transparent;
}
.gr-item::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff 0 52%, #3d7be6 52% calc(52% + 2px), var(--gr-sky) calc(52% + 2px));
}
.gr-food {
  position: absolute;
  left: 0;
  right: 0;
  top: 8%;
  text-align: center;
  font-size: 40cqw;
  line-height: 1;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .18));
}
.gr-band { position: absolute; left: 0; right: 0; top: 56%; display: flex; flex-direction: column; align-items: center; gap: 1cqw; }
.gr-win { font-size: 13.5cqw; font-weight: 500; white-space: nowrap; letter-spacing: -.02em; }
.gr-mine { display: inline-flex; align-items: center; font-size: 11.5cqw; font-weight: 800; color: #7a4a00; font-variant-numeric: tabular-nums; }
.gr-mine:empty { display: none; }
.gr-mine .gr-coin { width: 15cqw; height: 15cqw; }
.gr-mine i { margin-left: -4cqw; }
.gr-mine i:first-child { margin-left: 0; }
.gr-mine em { font-style: normal; margin-left: .15rem; }
.gr-mine.is-bump { animation: gr-bump .35s ease-out; }
@keyframes gr-bump { 40% { transform: scale(1.3); } }
.gr-coin {
  display: inline-block;
  flex: none;
  width: .95rem;
  height: .95rem;
  border-radius: 50%;
  background: url("/assets/coin-rjk.webp?v=5") center / cover no-repeat, radial-gradient(circle, #8a5a00 0 64%, transparent 66%);
  vertical-align: middle;
}
.gr-hot {
  position: absolute;
  z-index: 3;
  top: -.75rem;
  right: 0;
  padding: .02rem .42rem;
  border-radius: .35rem;
  background: linear-gradient(180deg, #ff7a52, #e8283c);
  border: 2px solid #fff;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  box-shadow: 0 2px 0 var(--gr-red-d);
}
.gr-hot::after {
  content: "";
  position: absolute;
  left: .35rem;
  bottom: -.38rem;
  border: .2rem solid transparent;
  border-top-color: #e8283c;
}
.gr-hot[hidden] { display: none; }

.gr-item.is-lit, .gr-item.is-win { border-color: var(--gr-red); box-shadow: 0 0 0 2px var(--gr-red-d), inset 0 0 0 2px var(--gr-red-d), 0 0 18px 6px rgba(232, 40, 60, .55); }
.gr-item.is-win { box-shadow: 0 0 0 2px var(--gr-red-d), inset 0 0 0 2px var(--gr-red-d), 0 0 26px 12px rgba(255, 200, 0, .95); animation: gr-win .6s ease-in-out infinite alternate; }
@keyframes gr-win { to { transform: translate(-50%, -50%) scale(1.1); } }
.gr-page.is-spin .gr-item:not(.is-lit):not(.is-win)::after,
.gr-page.is-done .gr-item:not(.is-win)::after {
  content: "";
  position: absolute;
  inset: -.42rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, .3);
}

/* center */
.gr-hub {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 35%;
  height: 35%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  background: var(--gr-red);
  border: .28rem solid #fff;
  box-shadow: 0 0 0 3px var(--gr-red-d), 0 6px 14px rgba(0, 0, 0, .3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 9%;
  container-type: size;
  color: #fff;
}
.gr-art {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 6%;
  height: 39%;
  border-radius: 50% 50% 8% 8% / 70% 70% 10% 10%;
  background: radial-gradient(circle at 50% 80%, #fff7c2 0 30%, #ffd84a 31% 62%, #f5b700 63%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .08);
}
.gr-art i { position: absolute; font-style: normal; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }
.gr-art .a1 { left: 2%; bottom: 0; font-size: 17cqw; }
.gr-art .a2 { right: 2%; bottom: 2%; font-size: 16cqw; }
.gr-art .a3 { left: 50%; top: 4%; transform: translateX(-50%) rotate(-20deg); font-size: 19cqw; }
.gr-bulbs { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.gr-bulbs i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6%;
  height: 6%;
  margin: -3% 0 0 -3%;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 4px rgba(255, 255, 255, .9);
  transform: rotate(calc(var(--b) * 22.5deg)) translateY(-650%);
}
.gr-page.is-spin .gr-bulbs i { animation: gr-bulb .4s steps(1) infinite; animation-delay: calc(var(--b) * -.05s); }
@keyframes gr-bulb { 50% { background: #fde047; box-shadow: 0 0 6px #fde047; } }
.gr-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; z-index: 1; }
.gr-ring circle { fill: none; stroke-width: 3; }
.gr-ring-fg { stroke: var(--gr-ring); stroke-linecap: round; stroke-dasharray: 100; opacity: .55; transition: stroke .3s; }
.gr-phase { position: relative; z-index: 2; font-size: 10.5cqw; font-weight: 500; white-space: nowrap; }
.gr-timer { position: relative; z-index: 2; font-size: 18cqw; font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.gr-timer::after { content: "s"; }
.gr-timer.is-tick { animation: gr-tick .45s ease-out; }
@keyframes gr-tick { from { transform: scale(1.4); color: #fff6a8; } }

/* ---------- table ---------- */
.gr-table { position: relative; z-index: 4; margin-top: 1rem; filter: drop-shadow(0 5px 0 var(--gr-blue-d)); }
.gr-top-face {
  position: relative;
  height: 2.6rem;
  margin: 0 .3rem;
  background: var(--gr-blue-d);
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
}
.gr-top-face::before {
  content: "";
  position: absolute;
  inset: 3px 3px 0;
  background: linear-gradient(180deg, #b5e6ff, #86cdfb);
  clip-path: polygon(7% 0, 93% 0, 100% 100%, 0 100%);
}
.gr-bonus {
  position: absolute;
  z-index: 5;
  top: -1.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}
.gr-bonus.is-salad { left: 2%; }
.gr-bonus.is-pizza { right: 2%; }
.gr-bonus span {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 58%, #e5e7eb 60%);
  border: 2px solid var(--gr-blue-d);
  font-size: 1.8rem;
  margin-bottom: -.35rem;
}
.gr-bonus b {
  position: relative;
  padding: 0 .45rem;
  border-radius: .3rem;
  background: linear-gradient(180deg, #ffe14d, #f5b700);
  border: 2px solid #8a5a00;
  color: var(--gr-ink);
  font-size: .78rem;
  font-weight: 800;
}
.gr-page.is-closed .gr-bonus { opacity: .7; }
.gr-house-tag {
  padding: 0 .3rem;
  border-radius: .25rem;
  background: #7c3aed;
  color: #fff;
  font-size: .68rem;
  text-transform: uppercase;
}
.gr-house {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .6rem;
  padding: .4rem .5rem;
  border-radius: .7rem;
  background: rgba(0, 0, 0, .18);
  overflow-x: auto;
  scrollbar-width: none;
}
.gr-house-label {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  margin-right: .2rem;
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.15;
}
.gr-house-label em { font-style: normal; font-weight: 600; opacity: .75; font-size: .65rem; }
.gr-hp {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  background: #fff3c4;
  border: 2px solid #fff;
}
.gr-hp img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.gr-hp b {
  position: absolute;
  bottom: -.35rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 .22rem;
  border-radius: .25rem;
  background: #7c3aed;
  color: #fff;
  font-size: .5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.gr-hp.is-bet { animation: gr-hp-bet .5s ease-out; }
@keyframes gr-hp-bet { 40% { transform: scale(1.18); box-shadow: 0 0 0 3px #facc15; } }
.gr-deck-tag {
  position: absolute;
  left: 50%;
  top: .55rem;
  transform: translateX(-50%);
  padding: .05rem .6rem;
  border-radius: .3rem;
  background: #fff;
  border: 2px solid var(--gr-blue-d);
  font-size: .8rem;
  font-weight: 700;
  white-space: nowrap;
}
.gr-deck {
  position: relative;
  margin: 0 .3rem;
  padding: .55rem .6rem .8rem;
  border-radius: 0 0 1rem 1rem;
  background: linear-gradient(180deg, #5db4f8, #3f9cf0);
  border: 3px solid var(--gr-blue-d);
  border-top: 0;
}
.gr-deck-title { margin: 0 0 .55rem; text-align: center; font-weight: 700; white-space: nowrap; font-size: clamp(.66rem, 3.2vw, 1rem); color: var(--gr-ink); }
.gr-chips { display: flex; justify-content: space-between; gap: .5rem; padding: 0 .2rem; }
.gr-chip {
  flex: 1;
  max-width: 5.2rem;
  aspect-ratio: 1.05;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: .6rem;
  border: 2px solid #64748b;
  background: linear-gradient(180deg, #fff, #eef2f7);
  box-shadow: 0 4px 0 #64748b;
  cursor: pointer;
  transition: transform .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
}
.gr-chip span {
  position: relative;
  width: 80%;
  aspect-ratio: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 50%;
  background: url("/assets/coin-rjk.webp?v=5") center / cover no-repeat, radial-gradient(circle, #8a5a00 0 64%, transparent 66%);
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, .3));
  color: #fff;
  font-weight: 900;
  font-size: 0;
  line-height: 1;
}
.gr-chip span::after {
  content: attr(data-v);
  margin-bottom: -.35rem;
  padding: .08rem .38rem;
  border-radius: 999px;
  background: var(--gr-ink);
  border: 1.5px solid #ffd84a;
  font-size: clamp(.7rem, 3.4vw, .95rem);
}
.gr-chip.is-on { background: linear-gradient(180deg, #ff4d5e, var(--gr-red)); border-color: var(--gr-red-d); box-shadow: 0 4px 0 var(--gr-red-d); transform: translateY(-2px); }

.gr-fly {
  position: fixed;
  z-index: 70;
  width: 1.6rem;
  height: 1.6rem;
  margin: -.8rem 0 0 -.8rem;
  border-radius: 50%;
  background: url("/assets/coin-rjk.webp?v=5") center / cover no-repeat, radial-gradient(circle, #8a5a00 0 64%, transparent 66%);
  pointer-events: none;
  transition: transform .45s cubic-bezier(.3, .7, .3, 1), opacity .45s;
}

/* ---------- red panel ---------- */
.gr-panel {
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  padding: .85rem .7rem calc(1rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #e52a3d, #cf1d31);
  border-radius: 1.4rem 1.4rem 0 0;
  color: #fff;
}
.gr-stats { display: flex; align-items: center; gap: .5rem; }
.gr-swap {
  flex: none;
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gr-ink);
}
.gr-swap .gr-coin { width: 2.1rem; height: 2.1rem; }
.gr-stat {
  flex: 1;
  min-width: 0;
  padding: .22rem .5rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid var(--gr-ink);
  color: var(--gr-ink);
  text-align: center;
  line-height: 1.2;
}
.gr-stat span { display: block; font-size: .85rem; }
.gr-stat strong { display: inline-flex; align-items: center; gap: .3rem; font-size: .95rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.gr-gem { font-style: normal; font-size: .85rem; }
.gr-stat b { font-weight: 700; }
.gr-stat b.is-up { color: #16a34a; }
.gr-stat b.is-down { color: #dc2626; }

.gr-results {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .75rem;
  padding: .45rem .55rem;
  border-radius: .7rem;
  background: rgba(255, 255, 255, .22);
}
.gr-results > span { flex: none; font-weight: 800; font-size: 1rem; padding-right: .5rem; border-right: 2px dotted rgba(255, 255, 255, .7); }
.gr-results > div { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: .15rem 0 .6rem; }
.gr-results i {
  position: relative;
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gr-ink);
  font-style: normal;
  font-size: 1.2rem;
}
.gr-results i.is-meat { background: #ffe58a; }
.gr-results i:first-child::after {
  content: "New";
  position: absolute;
  bottom: -.65rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0 .25rem;
  border-radius: .25rem;
  background: #ffe14d;
  border: 1.5px solid var(--gr-ink);
  color: var(--gr-ink);
  font-size: .55rem;
  font-weight: 800;
}
.gr-link { display: block; margin: .65rem auto 0; background: none; border: 0; color: #fff; font: inherit; font-size: 1rem; cursor: pointer; }
.gr-boards { display: flex; gap: .55rem; margin-top: .7rem; }
.gr-board {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .5rem;
  border-radius: .7rem;
  border: 2px solid var(--gr-ink);
  background: #fff;
  color: var(--gr-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gr-board > span:nth-child(2) { flex: 1; min-width: 0; line-height: 1.2; }
.gr-board b { display: block; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-board em { display: inline-flex; align-items: center; gap: .2rem; font-style: normal; font-size: .78rem; font-variant-numeric: tabular-nums; }
.gr-ava {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: #fde68a;
  border: 2px solid var(--gr-ink);
  font-size: 1.1rem;
}
.gr-ava img { width: 100%; height: 100%; object-fit: cover; }
.gr-lock { margin-top: .7rem; padding: .7rem; border-radius: .8rem; background: rgba(0, 0, 0, .18); text-align: center; }
.gr-lock p { margin: 0 0 .5rem; }
.gr-note { margin: .7rem 0 0; font-size: .7rem; text-align: center; opacity: .85; }

/* ---------- sheets / popups ---------- */
.gr-sheet { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 1rem; background: rgba(0, 0, 0, .45); }
.gr-sheet[hidden] { display: none; }
.gr-sheet-card {
  position: relative;
  width: 100%;
  max-width: 22rem;
  max-height: 80%;
  overflow: auto;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: #fff;
  border: 4px solid var(--gr-blue);
  animation: gr-pop .3s ease-out;
}
.gr-sheet-card h3 { margin: 0 0 .6rem; color: var(--gr-red); text-align: center; }
.gr-sub { margin: -.4rem 0 .5rem; text-align: center; font-size: .8rem; color: #6b7280; }
.gr-sheet-card ol { margin: 0; padding-left: 1.2rem; font-size: .9rem; line-height: 1.5; }
.gr-x { position: absolute; top: .3rem; right: .5rem; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #6b7280; }
.gr-records { font-size: .85rem; }
.gr-rec { display: flex; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px dashed #e5e7eb; }
.gr-rec em { font-style: normal; font-size: 1.2rem; min-width: 1.4rem; text-align: center; }
.gr-lb {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .45rem;
  padding: .5rem .7rem;
  border-radius: .8rem;
  background: #f1f5ff;
  border: 2px solid #dbe4ff;
}
.gr-lb.is-top { background: linear-gradient(90deg, #fff8d6, #fff); border-color: #fde68a; }
.gr-lb-rank {
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #cbd5e1;
  color: #fff;
  font-style: normal;
  font-weight: 900;
  font-size: .85rem;
}
.gr-lb.r1 .gr-lb-rank { background: linear-gradient(180deg, #ffd84a, #e3a000); box-shadow: 0 0 0 2px #fff3b0; }
.gr-lb.r2 .gr-lb-rank { background: linear-gradient(180deg, #e2e8f0, #94a3b8); }
.gr-lb.r3 .gr-lb-rank { background: linear-gradient(180deg, #f4b07a, #b45f2a); }
.gr-lb-ava {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--gr-blue);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--gr-blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}
.gr-lb-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gr-lb-name { flex: 1; min-width: 0; font-weight: 700; font-size: .95rem; color: var(--gr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-lb-amt { flex: none; display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; color: #16a34a; font-variant-numeric: tabular-nums; }
.gr-lb-amt .gr-coin { width: 1.15rem; height: 1.15rem; }
.gr-rec span { flex: 1; color: #4b5563; }
.gr-rec b { font-variant-numeric: tabular-nums; }
.gr-rec b.is-up { color: #16a34a; }
.gr-rec b.is-down { color: #dc2626; }

.gr-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 80;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, .92);
  color: #fff;
  font-size: .85rem;
  animation: gr-pop .25s ease-out;
}
.gr-toast[hidden] { display: none; }

.gr-pop { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, .35); }
.gr-pop[hidden] { display: none; }
.gr-pop-card {
  position: relative;
  min-width: 14rem;
  padding: 1.1rem 1.6rem 1rem;
  border-radius: 1.3rem;
  text-align: center;
  background: linear-gradient(180deg, #fffbe0, #ffe266);
  border: 4px solid var(--gr-red);
  box-shadow: 0 0 0 4px #fff, 0 16px 36px rgba(0, 0, 0, .4);
  color: #7c2d12;
  animation: gr-pop .4s cubic-bezier(.2, 1.4, .4, 1);
}
.gr-pop.is-lose .gr-pop-card { background: linear-gradient(180deg, #fff, #dbeafe); border-color: var(--gr-blue); color: #1e3a8a; }
.gr-pop-ico { display: block; font-size: 3.3rem; line-height: 1.1; animation: gr-bob 1s ease-in-out infinite alternate; }
.gr-pop-card b { display: block; font-size: 1.35rem; margin: .2rem 0; }
.gr-pop-card p { margin: 0; font-size: .9rem; }
.gr-pop-win { margin-top: .7rem; padding-top: .55rem; border-top: 1px dashed rgba(0, 0, 0, .18); text-align: left; }
.gr-pop-win[hidden] { display: none; }
.gr-pop-win > em { display: block; margin-bottom: .3rem; font-style: normal; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .7; text-align: center; }
.gr-pw { display: flex; align-items: center; gap: .45rem; padding: .18rem 0; font-size: .85rem; }
.gr-pw-ava { flex: none; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: #fff; border: 1px solid rgba(0, 0, 0, .12); font-size: .95rem; font-weight: 700; }
.gr-pw-ava img { width: 100%; height: 100%; object-fit: cover; }
.gr-pw-name { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-pop-card .gr-pw b { display: inline; margin: 0; font-size: .9rem; color: #16a34a; font-variant-numeric: tabular-nums; }
@keyframes gr-pop { from { transform: scale(.5); opacity: 0; } }
@keyframes gr-bob { to { transform: translateY(-6px) rotate(6deg); } }
.gr-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gr-confetti i { position: absolute; top: -10%; width: 8px; height: 14px; border-radius: 2px; animation: gr-fall linear forwards; }
@keyframes gr-fall { to { transform: translateY(115vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  .gr-item.is-win, .gr-pop-ico, .gr-page.is-spin .gr-bulbs i { animation: none; }
}
