:root {
  --roll-bar-height: 82px;
}

html,
.explore-body {
  height: 100%;
  overflow: hidden;
}

.explore-body {
  min-height: 100dvh;
  background: #080b10;
}

.explore-bar {
  position: relative;
  z-index: 10;
  height: var(--roll-bar-height);
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: clamp(20px, 4vw, 64px);
  padding: 0 clamp(18px, 3.2vw, 52px);
  border-bottom: 1px solid #343d52;
  background: #121724f7;
  box-shadow: 0 12px 34px #0005;
  backdrop-filter: blur(18px);
}

.explore-wordmark {
  font-size: 25px;
  white-space: nowrap;
}

.explore-wordmark svg {
  width: 26px;
  height: 28px;
}

.roll-identity {
  min-width: 0;
}

.roll-identity p {
  color: var(--coral);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

.roll-identity h1 {
  overflow: hidden;
  margin-top: 3px;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 550;
  letter-spacing: -.5px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roll-identity > span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roll-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.roll-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 550;
}

.roll-link:hover {
  color: var(--text);
}

.roll-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 18px;
  border-radius: 9px;
  background: var(--accent);
  color: #191c32;
  font-weight: 700;
  line-height: 1;
}

.roll-button:hover {
  background: #c8ccff;
}

.roll-key {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #6f76ae;
  border-radius: 5px;
  font-size: 10px;
}

.explore-stage {
  position: relative;
  width: 100%;
  max-width: none;
  height: calc(100dvh - var(--roll-bar-height));
  margin: 0;
  padding: 0;
  background: #080b10;
}

.explore-stage::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: #080b10cc;
  color: var(--muted);
  content: '';
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.explore-stage.is-loading::after {
  content: 'Loading game…';
  opacity: 1;
}

.explore-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #080b10;
}

.roll-loading,
.roll-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.roll-loading {
  color: var(--muted);
  font-size: 13px;
}

.roll-loading span {
  width: 44px;
  height: 44px;
  border: 2px solid #434c64;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: roll-spin .8s linear infinite;
}

.roll-error h1,
.roll-error h2 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 550;
}

.roll-error p {
  color: var(--muted);
}

.mobile-roll {
  height: 100%;
  display: grid;
  grid-template-rows: minmax(0, 56%) 1fr;
  background: var(--bg);
}

.mobile-roll-art {
  position: relative;
  overflow: hidden;
  background: #080b10;
}

.mobile-roll-art::after {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  background: linear-gradient(transparent, #121724);
  content: '';
}

.mobile-roll-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-roll-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  padding: 22px 6vw 28px;
}

.mobile-roll-copy p {
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
}

.mobile-roll-copy h2 {
  margin-top: 8px;
  font-size: clamp(28px, 9vw, 42px);
  font-weight: 550;
  letter-spacing: -1.2px;
  line-height: 1.05;
}

.mobile-roll-copy > span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-play {
  width: 100%;
  margin-top: 20px;
  text-decoration: none;
}

.mobile-roll-copy small {
  width: 100%;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

@keyframes roll-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 760px) {
  :root {
    --roll-bar-height: 132px;
  }

  .explore-bar {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 65px 67px;
    gap: 0 18px;
    padding: 0 4.5%;
  }

  .explore-wordmark {
    font-size: 22px;
  }

  .explore-wordmark svg {
    width: 22px;
  }

  .roll-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--line);
  }

  .roll-actions .roll-button {
    min-height: 44px;
    margin-left: auto;
  }

  .roll-key {
    display: none;
  }

  .roll-identity h1 {
    font-size: 18px;
  }

  .analytics-consent {
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }
}

@media (max-width: 400px) {
  .roll-actions {
    gap: 11px;
  }

  .roll-link {
    font-size: 11px;
  }

  .roll-button {
    padding: 0 14px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .roll-loading span {
    animation: none;
  }
}
