html, body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Only lock body scrolling when the page explicitly requests it */
body.ar-lock {
  overflow: hidden;
}

/* Main content grows to fill remaining space */
main {
  flex: 1;
  padding-top: max(var(--header-offset, 0px), 60px);
}

/* Canvas fills window */
#world {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  inset: 0;
  display: block;
  pointer-events: none;
}

#ar-logo {
  position: fixed;
  display: block;
  margin: 0;
  z-index: 1;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  width: min(250px, 70vw);
  pointer-events: none;
}

@media (max-width: 600px) {
  #ar-logo {
    width: min(300px, 70vw);
  }
}

@media (max-width: 400px) {
  #ar-logo {
    width: min(240px, 75vw);
  }
}

:root { --input-y: 75dvh; }

#type-input {
  position: fixed;
  top: var(--input-y);
  bottom: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(80%, 480px);
  padding: 14px 20px;
  font-size: 16px;
  border: 2px solid #000;
  border-radius: 999px;
  background: #fff;
  outline: none;
  z-index: 2;
}

/* Short screens: keep it above footer/safe-area */
@media (max-height: 560px) {
  #type-input {
    top: auto;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
  }
}

.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.collection-lead-left,
.collection-lead-right {
  margin: 0;
  padding: 0;
}

.collection-lead-left {
  text-align: left;
}

.collection-lead-right {
  text-align: right;
}
