/* The camera fills the screen; the bar, the hint and the answer float over it */

html,
body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

.stage {
  position: fixed;
  inset: 0;
  background: #000;
}

.stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* overlay.js mirrors the boxes to match */
.mirrored {
  transform: scaleX(-1);
}

.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
  cursor: crosshair;
}

.bar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: calc(env(safe-area-inset-top) + 16px) var(--gutter) 28px;
  background: linear-gradient(rgb(0 0 0 / 0.55), transparent);
  pointer-events: none;
}

.bar .status {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-2);
  text-align: right;
  text-overflow: ellipsis;
  text-shadow: var(--lift-text);
  white-space: nowrap;
}

.flip {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -10px -10px -10px 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
}

.hint {
  position: fixed;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom) + 24px);
  left: 0;
  margin: 0;
  color: var(--ink-2);
  text-align: center;
  text-shadow: var(--lift-text);
  pointer-events: none;
  transition: opacity var(--fade);
}

body:not(.live) .hint,
body:not(.live) .bar,
body.naming .hint {
  opacity: 0;
}

/* The answer */

.sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  max-width: 34rem;
  margin: 0 auto;
  padding: 22px var(--gutter) calc(env(safe-area-inset-bottom) + 22px);
  border-top: 1px solid var(--ink-4);
  background: rgb(8 8 8 / 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (min-width: 34rem) {
  .sheet {
    bottom: 24px;
    border: 1px solid var(--ink-4);
  }
}

.thumb {
  width: 72px;
  height: 72px;
  border: 1px solid var(--neon);
  box-shadow: 0 0 14px var(--neon-glow);
}

.answer {
  min-width: 0;
}

.answer p {
  margin: 0;
}

.seen {
  color: var(--ink-3);
}

.name {
  margin: 4px 0 2px;
  font-size: 30px;
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.share {
  color: var(--neon);
}

.others {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.others li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--ink-5);
  color: var(--ink-2);
  font-size: 14px;
}

.others .caps {
  color: var(--ink-3);
}

.close {
  align-self: start;
  width: 36px;
  height: 36px;
  margin: -8px -8px 0 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
}

/* Before the camera starts */

.intro {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: calc(env(safe-area-inset-top) + 32px) var(--gutter)
    calc(env(safe-area-inset-bottom) + 32px);
  background: var(--bg);
  transition: opacity var(--fade);
}

.intro > * {
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
}

body.live .intro {
  opacity: 0;
  pointer-events: none;
}

.intro h1 {
  margin-top: 18px;
  margin-bottom: 0;
  font-size: clamp(36px, 9vw, 56px);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 1.02;
}

.lede {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.45;
}

.start {
  margin-top: 8px;
  padding: 14px 22px;
  border: 1px solid var(--neon);
  background: none;
  color: var(--neon);
  box-shadow: 0 0 18px var(--neon-glow);
}

.start:disabled {
  border-color: var(--ink-4);
  color: var(--ink-3);
  box-shadow: none;
  cursor: progress;
}

.notice {
  color: var(--neon);
  font-size: 14px;
}

.small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.6;
}
