:root {
  color-scheme: dark;
  --ink: #e9f5ef;
  --muted: #9ab5aa;
  --line: rgba(226, 249, 237, 0.2);
  --panel: rgba(10, 17, 18, 0.78);
  --accent: #b5f36d;
  --accent-2: #78d8be;
  --edge: clamp(14px, 3vw, 28px);
  --top: env(safe-area-inset-top, 0px);
  --right: env(safe-area-inset-right, 0px);
  --bottom: env(safe-area-inset-bottom, 0px);
  --left: env(safe-area-inset-left, 0px);
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #101617;
}
body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
.experience {
  position: fixed;
  inset: 0;
  height: 100dvh;
  overflow: hidden;
}
#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.heading {
  position: absolute;
  top: calc(var(--edge) + var(--top));
  left: calc(var(--edge) + var(--left));
  pointer-events: none;
  max-width: 360px;
}
.heading a {
  pointer-events: auto;
  text-decoration: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent);
}
h1 {
  font-size: clamp(30px, 3.3vw, 48px);
  letter-spacing: -0.065em;
  line-height: 1.05;
  margin: 16px 0;
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 400;
  color: var(--accent-2);
}
.heading p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
button {
  font-weight: 600;
  line-height: 1.3;
  font-family: inherit;
  font-size: 11px;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  cursor: pointer;
  touch-action: manipulation;
}
button:hover {
  border-color: var(--accent);
  background: #25352c;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
#target:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
button,
a,
#target {
  -webkit-tap-highlight-color: transparent;
}
.toolbar {
  position: absolute;
  top: calc(var(--edge) + var(--top));
  right: calc(var(--edge) + var(--right));
  display: flex;
  align-items: center;
  gap: 8px;
}
.status {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  color: var(--muted);
}
.status i {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 4px #b5f36d0d;
}
#reset {
  background: var(--accent);
  color: #17251a;
  border-color: var(--accent);
}
.target-section {
  position: absolute;
  right: calc(var(--edge) + var(--right) + 14px);
  bottom: calc(92px + var(--bottom));
  width: 180px;
  text-align: center;
}
.target-section > .eyebrow {
  color: var(--muted);
  font-size: 9px;
}
#target {
  width: 180px;
  height: 160px;
  touch-action: none;
  cursor: grab;
  border-radius: 12px;
}
#target:active {
  cursor: grabbing;
}
.hint {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: -4px;
}
.target-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}
#random {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding: 8px;
}
#error {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 30px;
}
.footer {
  position: absolute;
  bottom: calc(var(--edge) + var(--bottom));
  left: calc(var(--edge) + var(--left));
  right: calc(var(--edge) + var(--right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer > div {
  display: flex;
  gap: 8px;
}
.footer button {
  color: var(--muted);
  font-weight: 400;
}
.orbit-hint {
  font-size: 10px;
  color: var(--muted);
}
#loading,
#drop {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 22px;
  background: #101617ed;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  max-width: 90%;
}
#drop p {
  margin: 0 0 16px;
}
#debug {
  position: absolute;
  left: calc(var(--edge) + var(--left));
  bottom: calc(90px + var(--bottom));
  padding: 14px;
  background: var(--panel);
  font: 11px/1.8 monospace;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: calc(100vw - 28px);
}
#debug span {
  color: var(--accent);
  float: right;
  margin-left: 20px;
}
#debug small {
  color: var(--muted);
}
[hidden] {
  display: none !important;
}
dialog {
  background: #14201f;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: min(540px, calc(100vw - 28px));
  max-height: 85dvh;
  padding: 30px;
  line-height: 1.7;
  font-size: 13px;
}
dialog::backdrop {
  background: #030808b8;
  backdrop-filter: blur(5px);
}
dialog h2 {
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
dialog p {
  color: #b6cac3;
}
dialog a {
  color: var(--accent);
  text-underline-offset: 3px;
}
#about-close {
  float: right;
  margin: -12px -12px 8px 12px;
}
@media (max-width: 720px), (max-height: 560px) {
  .heading,
  .orbit-hint {
    display: none;
  }
  .toolbar {
    left: calc(var(--edge) + var(--left));
    justify-content: flex-end;
  }
  .status {
    margin-right: auto;
    padding-left: 0;
  }
  .target-section {
    width: 140px;
    right: calc(8px + var(--right));
    bottom: calc(76px + var(--bottom));
  }
  #target {
    width: 140px;
    height: 130px;
  }
  .footer {
    gap: 8px;
  }
  .footer button {
    font-size: 10px;
    padding: 8px 12px;
  }
  .target-foot {
    gap: 8px;
    margin-top: 2px;
  }
  #debug {
    bottom: auto;
    top: 76px;
    font-size: 9px;
    max-width: 280px;
  }
}
@media (max-height: 560px) and (orientation: landscape) {
  .target-section {
    right: calc(var(--edge) + var(--right));
    bottom: calc(16px + var(--bottom));
    width: 130px;
  }
  #target {
    width: 130px;
    height: 112px;
  }
  .target-foot {
    margin: 0;
  }
  .hint {
    font-size: 9px;
  }
  .footer {
    right: auto;
  }
  .toolbar {
    left: auto;
  }
  .status {
    padding-right: 12px;
  }
  .footer button {
    min-height: 44px;
  }
  #debug {
    top: 74px;
  }
}
