/* 地摊套圈 · 2026-11-07 首版：夜市红棚摊位 */
.ring-main {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 120px;
}

.ring-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 16px;
}

.ring-title { margin: 0; font-size: clamp(26px, 4vw, 36px); }
.ring-subtitle { margin-top: 4px; opacity: .72; font-size: 13px; }

.ring-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.rg-stat {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(20, 30, 46, .72);
  border: 1px solid rgba(168, 205, 240, .22);
  font-size: 14px;
}
.rg-stat b { color: #ffd76a; font-size: 16px; }
.rg-best b { color: #a8cdf0; }

.ring-actions { display: flex; gap: 8px; }
.rg-btn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(168, 205, 240, .3);
  background: rgba(20, 30, 46, .72);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.rg-btn-main {
  background: linear-gradient(135deg, #e8452c, #b91c1c);
  border-color: rgba(255, 190, 120, .55);
  color: #fff7e8;
  font-weight: 700;
}

/* ---------- 摊位场景 ---------- */
.rg-stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255, 170, 90, .25);
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(60, 40, 90, .55), transparent 60%),
    linear-gradient(180deg, #131a2e 0%, #1a1430 34%, #241126 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  user-select: none;
  -webkit-user-select: none;
}

.rg-banner {
  position: relative;
  margin: 14px 14px 0;
  padding: 30px 12px 14px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(180deg, #d92b1f, #a3120d);
  box-shadow: inset 0 -14px 30px rgba(0, 0, 0, .35), 0 10px 26px rgba(0, 0, 0, .35);
}
.rg-lights {
  position: absolute;
  top: 8px; left: 6%; right: 6%;
  display: flex;
  justify-content: space-between;
}
.rg-lights i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #ffe9a8;
  box-shadow: 0 0 12px 4px rgba(255, 210, 110, .75);
  animation: rg-twinkle 1.6s ease-in-out infinite alternate;
}
.rg-lights i:nth-child(2n) { animation-delay: .5s; background: #ffb3ab; box-shadow: 0 0 12px 4px rgba(255, 130, 110, .7); }
.rg-lights i:nth-child(3n) { animation-delay: .9s; background: #a8e6ff; box-shadow: 0 0 12px 4px rgba(120, 200, 255, .7); }
@keyframes rg-twinkle { from { opacity: .55; } to { opacity: 1; } }

.rg-banner-title {
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 900;
  letter-spacing: .12em;
  color: #ffd21f;
  text-shadow: 0 2px 0 #8f0f08, 0 6px 22px rgba(0, 0, 0, .5);
}
.rg-banner-sub { margin-top: 4px; color: #ffe9c9; font-size: clamp(12px, 2vw, 14px); letter-spacing: .14em; }

.rg-boss {
  position: absolute;
  left: 18px;
  top: 148px;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}
.rg-boss-fig { font-size: 64px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .5)); }
.rg-boss-name {
  margin-top: 2px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: #ffe9c9;
}

.rg-bubble {
  position: absolute;
  left: 96px;
  top: 138px;
  z-index: 5;
  max-width: min(430px, 62%);
  padding: 9px 14px;
  border-radius: 16px 16px 16px 4px;
  background: #fff8ea;
  color: #42260a;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.rg-field {
  position: relative;
  height: clamp(380px, 56vw, 520px);
  margin-top: 64px;
  background:
    radial-gradient(90% 60% at 50% 38%, rgba(255, 90, 60, .16), transparent 70%),
    linear-gradient(180deg, #7e130d 0%, #a3160f 26%, #c1271b 62%, #a3160f 100%);
  box-shadow: inset 0 24px 44px rgba(0, 0, 0, .42), inset 0 -18px 34px rgba(0, 0, 0, .3);
  touch-action: none;
  cursor: crosshair;
}
.rg-field::after {
  /* 地面分界：摊位外的水泥地 */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 18px;
  background: linear-gradient(180deg, #4a4a52, #33333b);
  box-shadow: 0 -2px 0 rgba(255, 200, 140, .25);
}

.rg-prize {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -100%);
  text-align: center;
  pointer-events: none;
  transition: opacity .3s ease;
}
.rg-prize .rg-fig {
  display: block;
  line-height: 1;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45));
}
.rg-prize .rg-stool {
  display: block;
  height: 12px;
  margin: 2px auto 0;
  border-radius: 3px 3px 6px 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .4), inset 0 -3px 0 rgba(0, 0, 0, .25);
}
.rg-prize .rg-val {
  display: inline-block;
  margin-top: 3px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .52);
  color: #ffd76a;
  font-size: 12px;
  line-height: 17px;
  white-space: nowrap; /* P2-17 (2026-11-29 fixA)：“70 分”不再折成两行 */
}
.rg-prize.is-won { animation: rg-pop .55s ease; }
@keyframes rg-pop {
  30% { transform: translate(-50%, -128%) scale(1.18) rotate(-4deg); }
  100% { transform: translate(-50%, -100%) scale(1); }
}
.rg-prize.is-gone { opacity: 0; }

.rg-ring {
  position: absolute;
  z-index: 6;
  border-radius: 50%;
  border: 5px solid #37e0b0;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .25), 0 10px 18px rgba(0, 0, 0, .4), inset 0 0 8px rgba(255, 255, 255, .35);
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.rg-ring.is-miss { border-color: #9fb4c8; opacity: .85; }
.rg-ring.is-hit { border-color: #ffd21f; box-shadow: 0 0 0 2px rgba(0, 0, 0, .25), 0 0 26px 6px rgba(255, 210, 31, .65); }

.rg-aim {
  position: absolute;
  z-index: 7;
  width: 54px; height: 20px;
  border: 2px dashed rgba(255, 255, 255, .9);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .18);
}

.rg-hint {
  position: absolute;
  left: 0; right: 0; bottom: 26px;
  z-index: 3;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255, 240, 220, .85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
  pointer-events: none;
}

/* ---------- 奖品架 ---------- */
.rg-shelf {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(20, 30, 46, .6);
  border: 1px solid rgba(168, 205, 240, .16);
}
.rg-shelf-head { font-size: 15px; font-weight: 700; }
.rg-shelf-head span { font-weight: 400; font-size: 12.5px; opacity: .7; margin-left: 6px; }
.rg-shelf-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 30px; }
.rg-shelf-item { font-size: 24px; position: relative; }
.rg-shelf-item b {
  position: absolute;
  right: -6px; bottom: -4px;
  font-size: 12px;
  background: #e8452c;
  color: #fff;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 15px;
}
.rg-note { margin-top: 12px; font-size: 12.5px; opacity: .6; }

/* ---------- 弹窗 ---------- */
.rg-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 8, 16, .66);
  backdrop-filter: blur(6px);
}
.rg-modal-backdrop[hidden] { display: none; }
.rg-modal {
  width: min(430px, 100%);
  border-radius: 22px;
  padding: 24px;
  background: linear-gradient(180deg, #1d2a42, #141e30);
  border: 1px solid rgba(168, 205, 240, .25);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  text-align: center;
}
.rg-modal h2 { margin: 0 0 6px; font-size: 22px; }
.rg-modal-sub { margin: 0 0 16px; opacity: .78; font-size: 14px; }
.rg-shop-list { display: grid; gap: 10px; margin-bottom: 14px; }
.rg-pack {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 190, 120, .35);
  background: rgba(232, 69, 44, .14);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.rg-pack b { font-size: 17px; }
.rg-pack span { color: #ffd76a; font-size: 13.5px; }
.rg-pack:disabled { opacity: .4; cursor: not-allowed; }
.rg-free { width: 100%; margin-bottom: 10px; border-color: rgba(255, 210, 90, .5); color: #ffd76a; }
.rg-modal-close { width: 100%; }
.rg-end-prizes { font-size: 30px; min-height: 38px; margin-bottom: 16px; }
.rg-end-actions { display: flex; gap: 10px; justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .ring-main { padding-top: 14px; padding-bottom: 150px; /* P1-04 (2026-11-29 fixA)：页面级底边距 120→150px，底排奖品滚到底时离 tabbar 更远 */ }
}

@media (max-width: 640px) {
  .ring-main { width: calc(100% - 20px); }
  /* P2-17 (2026-11-29 fixA)：窄屏摊主与气泡移回横幅空区，不再压奖品与奖品脸；
     横幅标题略缩，给两侧留出位置；气泡最长文案（24 字）约 3 行，仍在横幅内 */
  .rg-banner-title { font-size: 26px; }
  .rg-boss { top: 20px; bottom: auto; left: 10px; }
  .rg-boss-fig { font-size: 38px; }
  /* 摊主名牌窄屏隐藏：横幅内放不下，名牌会压住横幅副文案 */
  .rg-boss-name { display: none; }
  .rg-bubble { left: auto; right: 10px; top: 20px; bottom: auto; max-width: 96px; font-size: 11.5px; padding: 8px 10px; }
  .rg-field { height: 360px; margin-top: 48px; /* P1-04：场地再缩 40px，各排奖品按比例上移，底排分牌首屏即可露出 tabbar 上沿 */ }
  .ring-stats { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rg-lights i, .rg-prize.is-won { animation: none; }
}

.rg-btn-link { display: inline-flex; align-items: center; text-decoration: none; }
.rg-btn[hidden] { display: none; }
