:root {
  --bg: #0d0f13;
  --ink: #e8eaf0;
  --muted: #7b8496;
  --line: rgba(255, 255, 255, .09);
  --hot: #ff5a4d;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(120% 90% at 30% 0%, #1c2230 0%, var(--bg) 62%),
    var(--bg);
  color: var(--ink);
  font: 400 14px/1.6 ui-sans-serif, -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 5vw, 64px);
}

.col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.stage {
  position: relative;
  will-change: transform;
}

#gl {
  display: block;
  aspect-ratio: 381 / 450;
  height: min(78vh, 680px);
  width: auto;
  border-radius: 10px;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, .5),
    0 30px 80px -20px rgba(0, 0, 0, .8);
  touch-action: none;
  -webkit-touch-callout: none;
  cursor: default;
}

#gl.is-hot  { cursor: grab; }
#gl.is-held { cursor: grabbing; }

/* Fallback when WebGL is unavailable */
.stage img {
  display: block;
  height: min(78vh, 680px);
  width: auto;
  border-radius: 10px;
}

/* Sits right over the cheeks, and gets out of the way on the first hit. */
.hint {
  position: absolute;
  left: 50%;
  top: 77%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 10px 18px 11px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: rgba(10, 12, 16, .58);
  backdrop-filter: blur(7px) saturate(1.2);
  -webkit-backdrop-filter: blur(7px) saturate(1.2);
  box-shadow: 0 6px 24px -6px rgba(0, 0, 0, .7);
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .03em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}

.hint b {
  display: block;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}

.hint.is-gone {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.25);
}

/* ------------------------------------------------------------------ panel */

.panel {
  max-width: 360px;
  color: #aeb6c4;
}

.panel p { margin: 0 0 14px; }

.panel__kicker {
  margin: 0 0 6px !important;
  color: var(--hot);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .19em;
  text-transform: uppercase;
}

.panel__title {
  margin: 0 0 18px;
  font-size: clamp(44px, 6vw, 62px);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.03em;
  color: var(--ink);
}

/* --------------------------------------------------------------------- CA */

.ca {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .12s ease;
}

.ca:hover {
  border-color: rgba(255, 90, 77, .5);
  background: rgba(255, 255, 255, .06);
}

.ca:active { transform: translateY(1px); }

.ca:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

.ca__label {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ca__value {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
  word-break: break-all;
  -webkit-user-select: text;
  user-select: text;
}

.ca__note {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.ca.is-copied {
  border-color: rgba(255, 90, 77, .65);
  background: rgba(255, 90, 77, .1);
}

.ca.is-copied .ca__note { color: var(--hot); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 880px) {
  body { overflow: auto; place-items: start center; }

  .wrap { flex-direction: column; gap: 26px; }

  #gl, .stage img { height: auto; width: min(86vw, 380px); }

  .panel { max-width: 520px; text-align: center; }
  .ca { text-align: center; }
}
