/* 刮刮乐 · 白 / 黄 / 浅灰（与 app-ui 一致） */

/* ── 纯背景首页 + 底部三按钮 ── */
.ggl-home {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}
.ggl-home-bg {
  position: fixed;
  inset: 0;
  background: #f5a623 url(/static/ggl/images/home-bg.png) center top / cover no-repeat;
  z-index: 0;
}
.ggl-page--clean {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: transparent;
}
.ggl-home-spacer { height: 100vh; height: 100dvh; pointer-events: none; }
.ggl-home-actions {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom) + 16px);
  z-index: 40;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  justify-content: center;
}
.ggl-game-page .ggl-home-actions {
  bottom: calc(env(safe-area-inset-bottom) + 16px);
}
.ggl-home-btn {
  flex: 1;
  max-width: 118px;
  border: none;
  border-radius: 18px;
  padding: 10px 6px 9px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  -webkit-tap-highlight-color: transparent;
}
.ggl-home-btn:active { transform: scale(0.97); }
.ggl-home-btn .ico {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ggl-home-btn .ico svg { width: 28px; height: 28px; display: block; }
.ggl-home-btn .txt {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
  white-space: nowrap;
}
.ggl-home-btn--play {
  flex: 1.12;
  max-width: 132px;
  padding: 12px 6px 10px;
  background: linear-gradient(180deg, #ffe566 0%, #ffb84d 55%, #ff9f2e 100%);
  box-shadow: 0 6px 18px rgba(255, 140, 0, 0.35);
}
.ggl-home-btn--play .txt { color: #8b3a00; }
.ggl-home-btn--exchange { position: relative; }
.ggl-home-btn--img {
  flex: 1;
  max-width: 118px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.ggl-home-btn--img img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ggl-home-btn--img.ggl-home-btn--play {
  flex: 1.12;
  max-width: 132px;
  background: transparent;
  box-shadow: none;
}
.ggl-home-btn--img.ggl-home-btn--exchange { position: relative; }
.ggl-home-badge {
  position: absolute;
  top: -4px;
  right: 21px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff3b30;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(255, 59, 48, 0.45);
  pointer-events: none;
}
.ggl-back-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  left: 12px;
  z-index: 50;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92) url(/static/ggl/images/back.png) center / 18px no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ggl-back-btn:active { transform: scale(0.96); }

.ggl-rule-btn {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 10px);
  right: 12px;
  z-index: 50;
  min-width: 44px;
  height: 36px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  color: #8a4b00;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ggl-rule-btn:active { transform: scale(0.96); }

.ggl-sub-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  min-height: var(--app-nav-h, 48px);
  padding: env(safe-area-inset-top) 16px 0 52px;
  background: rgba(255, 250, 238, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ggl-sub-nav .ggl-back-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top) + 8px);
  left: 12px;
}
.ggl-sub-nav-title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: var(--app-ink);
}
.ggl-sub-body {
  padding: 12px;
}

.ggl-page { background: var(--app-bg); min-height: 100vh; }
.ggl-page.ggl-page--clean { background: transparent; }

.ggl-hero {
  position: relative;
  padding-bottom: 22px;
  background-color: #e8c840;
  background-image: var(--app-sub-hero-bg);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}
.ggl-nav.app-nav {
  position: relative;
  background: transparent;
  box-shadow: none;
  border-bottom: none;
  color: var(--app-ink);
}
.ggl-nav .back {
  color: var(--app-ink);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.ggl-nav .title { color: var(--app-ink); font-weight: 700; }
.ggl-nav .right {
  color: var(--app-ink);
  font-size: 13px;
  font-weight: 600;
  opacity: 0.85;
}
.ggl-hero-inner {
  position: relative;
  z-index: 1;
  padding: 4px 18px 0;
  text-align: center;
}
.ggl-hero-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
}
.ggl-hero-inner h1 {
  margin: 0;
  font-family: var(--app-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--app-ink);
}
.ggl-hero-inner p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--app-ink);
  opacity: 0.72;
  line-height: 1.55;
}
.ggl-hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 0 2px;
}
.ggl-hero-actions .app-btn { flex: 1; }
.ggl-hero-actions .app-btn--ghost {
  background: #fff !important;
  color: var(--app-ink) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.ggl-stats {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 0 2px;
}
.ggl-stat {
  flex: 1;
  padding: 12px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  text-align: center;
}
.ggl-stat .num {
  display: block;
  font-family: var(--app-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--app-ink);
  line-height: 1.1;
}
.ggl-stat .lab {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--app-sub);
}

.ggl-body {
  position: relative;
  z-index: 2;
  margin-top: -8px;
  padding: 0 12px 16px;
  background: var(--app-bg);
  border-radius: 18px 18px 0 0;
}
.ggl-section {
  background: var(--app-card);
  border-radius: var(--app-radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--app-shadow);
}
.ggl-section-hd {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-ink);
  margin-bottom: 12px;
}
.ggl-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-top: 1px solid #f0f0f0;
}
.ggl-tier:first-of-type { border-top: 0; padding-top: 0; }
.ggl-tier .name { font-size: 14px; font-weight: 600; color: var(--app-text); }
.ggl-tier .desc { margin-top: 3px; font-size: 12px; color: var(--app-muted); }
.ggl-tier .tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--app-ink);
  background: var(--app-accent);
  padding: 4px 10px;
  border-radius: 20px;
}
.ggl-tip {
  font-size: 12px;
  color: var(--app-sub);
  line-height: 1.65;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--app-radius);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── 游戏页 ── */
.ggl-game-page {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--app-bg);
}
.ggl-game-page--home {
  background: #f5a623 !important;
}
.ggl-game-page--home .ggl-game-main { padding: 0; }
.ggl-game-page--home #page_index .ggl-home {
  min-height: 100vh;
  min-height: 100dvh;
}
.ggl-game-main { padding: 0; }

.ggl-quick-card {
  background: linear-gradient(135deg, #fff8d6 0%, #fff 55%, #f5f5f5 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--app-shadow);
  margin-bottom: 12px;
}
.ggl-quick-card .ico { font-size: 48px; line-height: 1; margin-bottom: 10px; }
.ggl-quick-card h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--app-ink);
}
.ggl-quick-card p {
  margin: 8px 0 16px;
  font-size: 13px;
  color: var(--app-sub);
  line-height: 1.5;
}
.ggl-quick-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.ggl-quick-btns .app-btn { min-width: 120px; }
.ggl-quick-btns .app-btn--ghost {
  background: #fff !important;
  color: var(--app-ink) !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.ggl-buy-card {
  background: var(--app-card);
  border-radius: var(--app-radius);
  padding: 16px;
  box-shadow: var(--app-shadow);
}
.ggl-buy-card .hd {
  font-size: 15px;
  font-weight: 700;
  color: var(--app-ink);
  text-align: center;
  margin-bottom: 8px;
}
.ggl-buy-balance {
  text-align: center;
  font-size: 13px;
  color: var(--app-sub);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #fff9e6;
  border-radius: 8px;
}
.ggl-buy-balance strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--app-ink);
}
.ggl-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.ggl-buy-row:last-child { border-bottom: 0; }
.ggl-buy-row .info strong { font-size: 15px; color: var(--app-ink); }
.ggl-buy-row .info span { display: block; margin-top: 2px; font-size: 12px; color: var(--app-muted); }
.ggl-buy-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ggl-buy-ctrl button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: var(--app-primary);
  color: var(--app-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 32px;
  padding: 0;
  cursor: pointer;
}
.ggl-buy-ctrl em {
  min-width: 24px;
  text-align: center;
  font-style: normal;
  font-weight: 700;
  color: var(--app-ink);
}
.ggl-buy-foot {
  margin-top: 16px;
  text-align: center;
}
.ggl-buy-total {
  font-size: 14px;
  color: var(--app-sub);
  margin-bottom: 12px;
}
.ggl-buy-total strong {
  font-size: 20px;
  color: var(--app-ink);
  font-weight: 700;
}

.ggl-record-list { background: var(--app-card); border-radius: var(--app-radius); overflow: hidden; box-shadow: var(--app-shadow); }
.ggl-record-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}
.ggl-record-item:last-child { border-bottom: 0; }
.ggl-record-item .left { color: var(--app-text); font-weight: 500; }
.ggl-record-item .right { text-align: right; }
.ggl-record-item .st { font-size: 12px; color: var(--app-muted); }
.ggl-record-item .win { color: #c9a800; font-weight: 700; }
.ggl-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--app-muted);
  font-size: 14px;
}

/* 弹层 */
.ggl-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.ggl-overlay.show { display: flex; }
.ggl-overlay-panel {
  width: 100%;
  max-width: 480px;
  max-height: min(72vh, 520px);
  background: #fff;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  animation: ggl-slide-up 0.28s ease;
}
@keyframes ggl-slide-up {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.ggl-overlay-hd {
  flex-shrink: 0;
  padding: 16px 20px;
  background: linear-gradient(180deg, #ffe566 0%, #ffb84d 100%);
  font-size: 16px;
  font-weight: 700;
  color: #333;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.ggl-overlay-bd {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fafafa;
}
.ggl-overlay-close-btn {
  flex-shrink: 0;
  width: 100%;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border: none;
  border-top: 1px solid #eee;
  background: #fff;
  color: #888;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ggl-overlay-close-btn:active { background: #f5f5f5; }

.ggl-empty-state {
  text-align: center;
  padding: 28px 16px 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--app-shadow-sm);
}
.ggl-empty-state--loading { padding: 36px 16px; }
.ggl-empty-state__ico {
  font-size: 44px;
  line-height: 1;
  margin-bottom: 12px;
  opacity: 0.85;
}
.ggl-empty-state__msg {
  margin: 0 0 18px;
  font-size: 15px;
  color: #666;
  line-height: 1.55;
}
.ggl-empty-state__msg:last-child { margin-bottom: 0; }
.ggl-empty-state .app-btn {
  min-width: 140px;
  height: 42px !important;
  min-height: 42px !important;
  font-size: 15px !important;
}
.ggl-empty-state__spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  border: 3px solid #eee;
  border-top-color: var(--app-primary, #ffe566);
  border-radius: 50%;
  animation: ggl-spin 0.7s linear infinite;
}
@keyframes ggl-spin {
  to { transform: rotate(360deg); }
}

/* 刮卡弹层：居中展示 */
.ggl-overlay--scratch {
  align-items: center;
  padding: 20px 14px;
  background: rgba(20, 12, 0, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ggl-overlay--scratch.show { display: flex; }

.ggl-scratch-modal {
  width: 100%;
  max-width: 360px;
  animation: ggl-scratch-in 0.32s cubic-bezier(0.34, 1.2, 0.64, 1);
}
@keyframes ggl-scratch-in {
  from { transform: scale(0.88) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.ggl-scratch-modal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
}
.ggl-scratch-modal-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.ggl-scratch-modal-ico { font-size: 20px; line-height: 1; }
.ggl-scratch-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ggl-scratch-modal-close:active { background: rgba(255, 255, 255, 0.3); transform: scale(0.94); }

.ggl-scratch-progress {
  margin-top: 12px;
  padding: 0 4px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.ggl-scratch-progress--active {
  opacity: 1;
  transform: translateY(0);
}
.ggl-scratch-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}
.ggl-scratch-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffe566, #ffb84d);
  transition: width 0.25s ease;
  box-shadow: 0 0 8px rgba(255, 184, 77, 0.6);
}
.ggl-scratch-progress-txt {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
}

.ggl-choose-item {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  box-shadow: var(--app-shadow);
}
.ggl-choose-item .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ggl-choose-item .name { font-size: 15px; font-weight: 600; color: var(--app-ink); }
.ggl-choose-item .cnt { font-size: 13px; color: var(--app-sub); margin-top: 4px; }

.ggl-exchange-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  box-shadow: var(--app-shadow-sm);
}
.ggl-exchange-item .info { font-size: 14px; color: var(--app-text); }
.ggl-exchange-item .app-btn {
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 16px !important;
  font-size: 13px !important;
}

/* 刮卡区 */
.ggl-scratch-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 0 0 3px rgba(255, 209, 0, 0.55),
    0 12px 40px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.ggl-scratch-frame {
  position: relative;
  background: linear-gradient(180deg, #c5cad2 0%, #aeb4be 42%, #9aa1ac 100%);
  min-height: 280px;
}
.ggl-scratch-hd {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-around;
  gap: 6px;
  padding: 10px 8px 8px;
  background: transparent;
  border-bottom: none;
}
.ggl-scratch-award {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 4px;
  border-radius: 10px;
  background: transparent;
  border: 1.5px dashed rgba(255, 255, 255, 0.22);
  box-shadow: none;
  position: relative;
  z-index: 1;
}
.ggl-scratch-award-num {
  font-size: 16px;
  font-weight: 800;
  color: #c62828;
  line-height: 1.1;
  font-family: var(--app-display, sans-serif);
}
.ggl-scratch-award-lab {
  margin-top: 2px;
  font-size: 10px;
  font-weight: 600;
  color: rgba(100, 60, 0, 0.65);
}
.ggl-scratch-grid-wrap {
  position: relative;
  z-index: 3;
  touch-action: none;
}
.ggl-scratch-grid-wrap--active {
  cursor: crosshair;
}
.ggl-scratch-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 8px 10px 12px;
  background: transparent;
}
.ggl-scratch-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  z-index: 1;
  --scratch-pct: 0;
}
.ggl-scratch-cell--scratching {
  z-index: 2;
}
.ggl-scratch-cell--revealed {
  z-index: 3;
}
.ggl-scratch-cell-face {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff 0%, #fff8e1 100%);
  border-radius: 12px;
  border: 1.5px solid rgba(255, 184, 77, 0.45);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 700;
  color: #333;
  text-align: center;
  line-height: 1.2;
  padding: 4px;
}
.ggl-scratch-cell-num {
  font-size: 15px;
  font-weight: 800;
  color: #1a1a1a;
  font-family: var(--app-display, sans-serif);
}
.ggl-scratch-cell-face small {
  font-size: 10px;
  font-weight: 600;
  color: #c9a800;
  margin-top: 2px;
}
.ggl-scratch-cell--revealed .ggl-scratch-cell-face {
  animation: ggl-cell-pop 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes ggl-cell-pop {
  0% { transform: scale(0.92); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}
.ggl-scratch-mask-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}
.ggl-scratch-sheet {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  border-radius: 0 0 16px 16px;
  background:
    linear-gradient(145deg, #969ca8 0%, #c5cad2 18%, #e4e8ee 38%, #b8bcc6 58%, #eef1f5 72%, #aeb4be 88%, #969ca8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -2px 6px rgba(0, 0, 0, 0.08);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  transition: opacity 0.35s ease;
}
.ggl-scratch-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    -42deg,
    transparent,
    transparent 6px,
    rgba(255, 255, 255, 0.16) 6px,
    rgba(255, 255, 255, 0.16) 7px
  );
  pointer-events: none;
}
.ggl-scratch-sheet::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 28%, transparent 55%),
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.35) 0%, transparent 42%),
    radial-gradient(circle at 78% 82%, rgba(0, 0, 0, 0.06) 0%, transparent 38%);
  pointer-events: none;
}
.ggl-scratch-sheet--gone {
  opacity: 0 !important;
}
.ggl-scratch-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  border-radius: 14px;
  background: rgba(40, 30, 10, 0.72);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  animation: ggl-hint-pulse 1.6s ease-in-out infinite;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ggl-scratch-hint-finger {
  font-size: 28px;
  line-height: 1;
  animation: ggl-finger-bounce 1.2s ease-in-out infinite;
}
.ggl-scratch-hint--hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
}
@keyframes ggl-hint-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25); }
  50% { box-shadow: 0 4px 28px rgba(255, 209, 0, 0.45); }
}
@keyframes ggl-finger-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
#myCanvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 9;
  pointer-events: none;
  touch-action: none;
  display: block;
}
.ggl-scratch-marks {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  overflow: hidden;
}
.ggl-scratch-mark {
  position: absolute;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0%, rgba(210, 216, 228, 0.38) 32%, rgba(150, 156, 168, 0.12) 58%, transparent 72%);
  mix-blend-mode: overlay;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.1s ease, transform 0.14s ease;
}
.ggl-scratch-mark--show {
  opacity: 1;
  transform: scale(1);
}
.ggl-scratch-mark--strong {
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(190, 196, 208, 0.45) 28%, rgba(120, 126, 140, 0.15) 55%, transparent 72%);
  mix-blend-mode: soft-light;
}
.ggl-scratch-flake {
  position: absolute;
  width: 5px;
  height: 3px;
  margin: -1px 0 0 -2px;
  border-radius: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(200, 206, 218, 0.6));
  opacity: 0;
  transform: scale(0.3) rotate(0deg);
  transition: opacity 0.15s ease, transform 0.55s cubic-bezier(0.22, 0.8, 0.32, 1);
  pointer-events: none;
}
.ggl-scratch-flake--fly {
  opacity: 0.85;
  transform: scale(1) rotate(140deg) translateY(-12px);
}
.ggl-scratch-frame.ggl-scratch-frame--active {
  touch-action: none;
}
.ggl-scratch-actions {
  text-align: center;
  margin-top: 14px;
}
.ggl-scratch-onekey {
  display: inline-block;
  color: #8b3a00;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 28px;
  background: linear-gradient(180deg, #ffe566 0%, #ffb84d 55%, #ff9f2e 100%);
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.4);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: ggl-onekey-in 0.3s ease;
}
.ggl-scratch-onekey:active { transform: scale(0.96); }
@keyframes ggl-onekey-in {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ggl-scratch-actions .link {
  display: inline-block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

.ggl-modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ggl-modal-mask.show { display: flex; }
.ggl-modal-box {
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 18px;
  padding: 28px 22px 22px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  animation: ggl-modal-in 0.22s ease;
}
@keyframes ggl-modal-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.ggl-modal-box .msg {
  font-size: 16px;
  font-weight: 500;
  color: var(--app-text, #333);
  line-height: 1.6;
  margin: 0 0 22px;
}
.ggl-modal-box .app-btn {
  min-width: 140px;
  height: 42px !important;
  min-height: 42px !important;
  font-size: 15px !important;
}

.ggl-pages { display: none; }
.ggl-pages.active { display: block; }
