*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: #120c18;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #f6efe4;
  background: #120c18;
  hyphens: auto;
  -webkit-tap-highlight-color: transparent;
}

button,
.gpr-hit {
  font-family: inherit;
  cursor: pointer;
}

.frame {
  position: relative;
  width: 3.75rem;
  min-height: 100vh;
  margin: 0 auto;
  box-shadow: 0 0.24rem 0.7rem rgba(0, 0, 0, 0.35);
}

.gpr-bg {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 0;
  width: 3.75rem;
  height: 100vh;
  height: 100lvh;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  transform: translateX(-50%);
}

.frame.is-scroll-bg .gpr-bg {
  position: absolute;
  top: 0;
  height: 100%;
  background-position: center top;
  background-size: 100% auto;
}

.frame > :not(.gpr-bg) {
  position: relative;
  z-index: 1;
}

.gpr-natural,
.gpr-gold-img {
  display: block;
  width: 100%;
  height: auto;
  cursor: default;
}

.gpr-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #3a3450;
  color: #d9d3e6;
  font-size: 0.12rem;
  line-height: 1.4;
  text-align: center;
  cursor: default;
}

.gpr-ph span {
  padding: 0.08rem;
  overflow-wrap: anywhere;
}

.gpr-crop-box {
  width: 100%;
  overflow: hidden;
  cursor: default;
}

.gpr-crop-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gpr-hit {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: inherit;
  cursor: pointer;
}

button .gpr-natural,
button .gpr-gold-img,
button .gpr-ph,
button .gpr-crop-box,
.gpr-hit .gpr-natural,
.gpr-hit .gpr-gold-img,
.gpr-hit .gpr-ph,
.gpr-hit .gpr-crop-box {
  cursor: pointer;
}

.gpr-banner {
  position: relative;
}

.frame > .gpr-banner.is-sticky {
  position: sticky;
  top: 0;
  z-index: 20;
}

.gpr-shot {
  position: relative;
}

.gpr-title-text {
  margin: 0.16rem 0.12rem;
  font-family: inherit;
  font-size: 0.22rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-align: center;
  overflow-wrap: anywhere;
}

.gpr-title-text.is-gold { color: #e6c48a; }
.gpr-title-text.is-pink { color: #f3a6c8; }
.gpr-title-text.is-white { color: #ffffff; }

.gpr-grid {
  display: grid;
  gap: 0.08rem;
  padding: 0.12rem;
}

.gpr-grid.is-cols-1 { grid-template-columns: 1fr; }
.gpr-grid.is-cols-2 { grid-template-columns: 1fr 1fr; }
.gpr-grid.is-cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.gpr-grid-item {
  overflow: hidden;
  border-radius: 0.08rem;
}

.gpr-games {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.12rem;
}

.gpr-games-wide {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.gpr-games-wide .gpr-natural,
.gpr-games-wide .gpr-crop-box,
.gpr-games-wide .gpr-ph {
  width: 100%;
  cursor: default;
}

.gpr-game {
  display: flex;
  gap: 0.1rem;
  align-items: center;
}

.gpr-game-cover {
  width: 1.7rem;
  flex: none;
  overflow: hidden;
  border-radius: 0.08rem;
}

.gpr-game-meta {
  flex: 1;
  min-width: 0;
}

.gpr-game-head {
  display: flex;
  gap: 0.08rem;
  align-items: center;
  margin-bottom: 0.08rem;
}

.gpr-game-head .gpr-crop-box,
.gpr-game-head .gpr-ph {
  width: 0.4rem;
  height: 0.4rem;
  flex: none;
  overflow: hidden;
  border-radius: 0.06rem;
}

.gpr-game-name {
  display: -webkit-box;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 0.16rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.gpr-gold {
  display: block;
  width: 100%;
  min-height: 0.44rem;
  height: auto;
  padding: 0.08rem 0.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8e4ba, #e0b86a 42%, #b48742);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #3d2412;
  font-size: 0.15rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: normal;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-cta-row {
  padding: 0.12rem 0;
}

.gpr-cta {
  display: block;
  margin: 0.08rem auto;
  padding: 0;
  border: 0;
  background: none;
}

.gpr-overlay {
  position: absolute;
  left: 50%;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  transform: translate(-50%, -50%);
}

.frame > .gpr-footer {
  width: 3.47rem;
  margin: 0.16rem auto;
  padding-bottom: env(safe-area-inset-bottom);
}

button:focus-visible {
  outline: 2px solid #f6efe4;
  outline-offset: 2px;
}

.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  z-index: 100;
  transform: translateX(-50%);
  max-width: min(92vw, 3.4rem);
  padding: 12px 18px;
  border: 1px solid rgba(230, 196, 138, 0.4);
  border-radius: 16px;
  background: rgba(20, 10, 16, 0.94);
  color: #f6efe4;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
  white-space: normal;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.toast[hidden] { display: none; }

html.gpr-age-pending,
html.gpr-age-pending body {
  height: 100%;
  overflow: hidden;
}

html.gpr-age-pending .frame img,
html.gpr-age-minor .frame img {
  filter: blur(20px);
  clip-path: inset(0);
}

html.gpr-age-pending .frame .gpr-bg,
html.gpr-age-minor .frame .gpr-bg {
  filter: blur(20px);
  transform: translateX(-50%) scale(1.1);
}

html.gpr-age-pending .gpr-banner,
html.gpr-age-pending .gpr-shot,
html.gpr-age-pending .gpr-title-image,
html.gpr-age-pending .gpr-grid-item,
html.gpr-age-pending .gpr-crop-box,
html.gpr-age-pending .gpr-game-cover,
html.gpr-age-pending .gpr-games-wide,
html.gpr-age-pending .frame button,
html.gpr-age-minor .gpr-banner,
html.gpr-age-minor .gpr-shot,
html.gpr-age-minor .gpr-title-image,
html.gpr-age-minor .gpr-grid-item,
html.gpr-age-minor .gpr-crop-box,
html.gpr-age-minor .gpr-game-cover,
html.gpr-age-minor .gpr-games-wide,
html.gpr-age-minor .frame button {
  overflow: hidden;
}

.gpr-age {
  display: none;
}

html.gpr-age-pending .gpr-age {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 4, 8, 0.72);
  font-size: 16px;
}

.gpr-age-panel {
  width: min(92vw, 3.4rem);
  padding: 28px 24px 22px;
  border: 1px solid rgba(230, 196, 138, 0.46);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(168, 48, 78, 0.28), transparent 46%),
    #1a0e16;
  color: #f6efe4;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.gpr-age-panel h2 {
  margin: 0;
  font-family: inherit;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-age-text {
  margin: 12px 0 0;
  color: rgba(246, 239, 228, 0.82);
  font-size: 15px;
  line-height: 1.55;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-age-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  color: #f6efe4;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-age-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.gpr-age-yes {
  display: block;
  width: 100%;
  min-height: 44px;
  height: auto;
  margin-top: 12px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f6e0b4, #c4964a);
  color: #3d2412;
  font-size: 15px;
  line-height: 1.3;
  white-space: normal;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-age-yes:disabled {
  background: #6b6560;
  color: #c8c2ba;
  cursor: default;
}

.gpr-age-slide-hint {
  margin: 14px 0 0;
  color: rgba(246, 239, 228, 0.9);
  font-size: 14px;
  line-height: 1.45;
  hyphens: auto;
  overflow-wrap: anywhere;
}

.gpr-age-slide-hint.is-miss {
  color: #f0b4b4;
}

.gpr-age-slide {
  margin-top: 12px;
  touch-action: none;
  user-select: none;
}

.gpr-age-slide-track {
  position: relative;
  height: 48px;
  border: 1px solid rgba(230, 196, 138, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  touch-action: none;
}

.gpr-age-slide-zone {
  position: absolute;
  top: 4px;
  bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #e6c48a;
  border-radius: 999px;
  background: rgba(230, 196, 138, 0.16);
  color: #f6e0b4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.gpr-age-slide-zone[hidden] {
  display: none;
}

.gpr-age-slide-knob {
  position: absolute;
  top: 4px;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, #f6e0b4, #c4964a);
  color: #3d2412;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  cursor: grab;
  touch-action: none;
}

.gpr-age-slide-knob::before {
  content: "";
  width: 10px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) left center / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) center center / 2px 100% no-repeat,
    linear-gradient(currentColor, currentColor) right center / 2px 100% no-repeat;
}

.gpr-age-slide-track.is-drag .gpr-age-slide-knob {
  cursor: grabbing;
}

.gpr-age-slide-track.is-ok .gpr-age-slide-zone {
  border-style: solid;
  background: rgba(230, 196, 138, 0.42);
}

.gpr-age-slide-track.is-ok .gpr-age-slide-knob::before {
  width: 7px;
  height: 12px;
  background: none;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(40deg) translate(-1px, -2px);
}

.gpr-age-slide-track.is-miss {
  animation: gpr-age-shake 0.42s ease;
}

@keyframes gpr-age-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .gpr-age-slide-track.is-miss {
    animation: none;
  }
}

.gpr-age-no {
  display: block;
  width: 100%;
  min-height: 44px;
  height: auto;
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(230, 196, 138, 0.45);
  border-radius: 999px;
  background: transparent;
  color: #f6efe4;
  font-size: 15px;
  line-height: 1.3;
  white-space: normal;
  hyphens: auto;
  overflow-wrap: anywhere;
}

html.gpr-age-pending .gpr-age {
  overflow: hidden;
}

.gpr-age-panel.is-art {
  position: relative;
  flex: none;
  width: min(calc(3.75rem * var(--gpr-age-size) / 100), calc(82vh * 2 / 3));
  width: min(calc(3.75rem * var(--gpr-age-size) / 100), calc(82dvh * 2 / 3));
  max-height: 82vh;
  max-height: 82dvh;
  aspect-ratio: 2 / 3;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  container-type: inline-size;
  color: #5a3a22;
}

.gpr-age-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
  pointer-events: none;
}

.gpr-age-panel.is-art .gpr-age-copy {
  position: absolute;
  top: calc(var(--gpr-age-top) * 1%);
  right: calc((100 - var(--gpr-age-right)) * 1%);
  bottom: calc((100 - var(--gpr-age-bottom)) * 1%);
  left: calc(var(--gpr-age-left) * 1%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1cqw;
  overflow: hidden;
  text-align: center;
}

.gpr-age-panel.is-art h2 {
  margin: 0;
  color: #3b2414;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(12px, 4.2cqw, 22px);
  font-weight: 700;
  line-height: 1.12;
}

.gpr-age-panel.is-art .gpr-age-text,
.gpr-age-panel.is-art .gpr-age-slide-hint,
.gpr-age-panel.is-art .gpr-age-check {
  margin: 0;
  color: #5a3a22;
  line-height: 1.22;
}

.gpr-age-panel.is-art .gpr-age-check {
  gap: 1.8cqw;
  font-size: clamp(9px, 2.85cqw, 14px);
  text-align: left;
}

.gpr-age-panel.is-art .gpr-age-check input {
  width: 4cqw;
  height: 4cqw;
  min-width: 14px;
  min-height: 14px;
  accent-color: #8a1c2c;
}

.gpr-age-panel.is-art .gpr-age-yes {
  flex: none;
  width: 100%;
  min-height: 36px;
  margin-top: 0;
  padding: 0.8cqw 2cqw;
  border: 1px solid #e6c48a;
  border-radius: 8px;
  background: linear-gradient(180deg, #9b2340, #5c1020);
  color: #fff;
  font-size: clamp(11px, 3.3cqw, 16px);
  line-height: 1.2;
}

.gpr-age-panel.is-art .gpr-age-yes:disabled {
  background: linear-gradient(180deg, #9b2340, #5c1020);
  color: #fff;
  opacity: 0.45;
  cursor: default;
}

.gpr-age-panel.is-art .gpr-age-text {
  font-size: clamp(9px, 3cqw, 15px);
}

.gpr-age-panel.is-art .gpr-age-slide,
.gpr-age-panel.is-art .gpr-age-slide-hint {
  margin-top: 0;
}

.gpr-age-panel.is-art .gpr-age-slide-hint {
  font-size: clamp(9px, 2.85cqw, 14px);
}

.gpr-age-panel.is-art .gpr-age-slide-hint.is-miss {
  color: #8a1c2c;
}

.gpr-age-panel.is-art .gpr-age-slide-track {
  height: clamp(32px, 11cqw, 44px);
  border-color: rgba(59, 36, 20, 0.45);
  background: rgba(90, 58, 34, 0.08);
}

.gpr-age-panel.is-art .gpr-age-slide-zone {
  border-color: #8a1c2c;
  background: rgba(138, 28, 44, 0.14);
  color: #8a1c2c;
  font-size: clamp(9px, 2.6cqw, 12px);
}

.gpr-age-panel.is-art .gpr-age-slide-track.is-ok .gpr-age-slide-zone {
  background: rgba(138, 28, 44, 0.28);
}

.gpr-age-panel.is-art .gpr-age-slide-knob {
  width: calc(clamp(32px, 11cqw, 44px) - 8px);
  height: calc(clamp(32px, 11cqw, 44px) - 8px);
  background: linear-gradient(180deg, #9b2340, #5c1020);
  color: #fff;
}

.gpr-age-panel.is-art .gpr-age-no {
  flex: none;
  width: 100%;
  min-height: 36px;
  margin-top: 0;
  padding: 0.8cqw 2cqw;
  border: 1px solid #3b2414;
  border-radius: 8px;
  background: transparent;
  color: #3b2414;
  font-size: clamp(11px, 3.3cqw, 16px);
  line-height: 1.2;
}
