:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #183629;
  background: #f6f8f4;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header,
main {
  max-width: 450px;
  margin: auto;
  padding-inline: 22px;
}
header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #183629;
  letter-spacing: -1.3px;
  font-size: 26px;
  font-weight: 750;
}
.brand img {
  margin-right: 7px;
}
.brand span {
  color: #497444;
}
.help,
#close {
  border: 1px solid #cbd5c9;
  border-radius: 50%;
  background: transparent;
  font: 600 16px inherit;
  color: #496052;
  min-width: 36px;
  height: 36px;
  cursor: pointer;
}
.steps {
  display: flex;
  gap: 5px;
  margin: 8px 0 22px;
}
.steps span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: #dbe4d8;
}
.steps .on {
  background: #587d50;
}
.kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #546b56;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(31px, 8vw, 40px);
  line-height: 1.12;
  letter-spacing: -1.7px;
  font-weight: 660;
}
#instruction {
  color: #56685c;
  line-height: 1.5;
  font-size: 16px;
  margin: 8px 0 16px;
}
.viewer {
  position: relative;
  aspect-ratio: 1.45;
  isolation: isolate;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(ellipse at 50% 45%, #335045, #163027 85%);
}
.viewer:before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 23px, #d0e8d006 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, #d0e8d006 23px 24px);
}
video {
  display: none;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.live video {
  display: block;
}
.reticle {
  position: absolute;
  left: 8%;
  width: 84%;
  aspect-ratio: 1.585;
  top: 50%;
  transform: translateY(-50%);
}
.reticle b {
  position: absolute;
  width: 15px;
  height: 15px;
  border: solid #d7efa9;
  border-width: 0;
}
.reticle b:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 2px 0 0 2px;
}
.reticle b:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 2px 2px 0 0;
}
.reticle b:nth-child(3) {
  left: 0;
  bottom: 0;
  border-width: 0 0 2px 2px;
}
.reticle b:nth-child(4) {
  right: 0;
  bottom: 0;
  border-width: 0 2px 2px 0;
}
#art {
  position: absolute;
  inset: 7%;
  width: 86%;
  height: 86%;
  border-radius: 8px;
}
.live #art,
.selfie #art,
.selfie b {
  display: none;
}
.selfie .reticle {
  height: 83%;
  width: auto;
  aspect-ratio: 0.77;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 2px dashed #d5ecbd;
  border-radius: 50%;
}
.selfie video {
  transform: scaleX(-1);
}
.camera-state {
  position: absolute;
  bottom: 9px;
  left: 12px;
  font:
    11px ui-monospace,
    monospace;
  letter-spacing: 0.02em;
  background: #152b22c9;
  color: white;
  border-radius: 5px;
  padding: 3px 7px;
}
#notice:not(:empty) {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #d6e1ce;
  border-radius: 10px;
  background: #edf3e8;
  font-size: 15px;
  line-height: 1.4;
}
#notice.error {
  color: #803c24;
  background: #fff4e9;
  border-color: #ead6bc;
}
.controls {
  margin-top: 17px;
  display: grid;
  gap: 3px;
}
.primary,
.text-button {
  width: 100%;
  min-height: 46px;
  font: 600 16px inherit;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  border: 0;
  cursor: pointer;
}
.primary {
  color: white;
  background: #264f38;
  border-radius: 10px;
}
.primary:disabled {
  background: #526b53;
  cursor: progress;
}
.text-button {
  background: transparent;
  color: #526852;
  font-weight: 500;
}
.privacy {
  font-size: 13px;
  line-height: 1.5;
  color: #637066;
  text-align: center;
  margin: 3px 8px max(16px, env(safe-area-inset-bottom));
}
button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #73a34f;
  outline-offset: 3px;
}
dialog {
  width: min(410px, 90vw);
  border: 1px solid #d2decf;
  border-radius: 15px;
  padding: 20px;
  color: inherit;
}
dialog::backdrop {
  background: #17271cb0;
}
dialog div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
h2 {
  font-size: 20px;
  letter-spacing: -0.6px;
}
dialog p {
  margin-top: 13px;
  line-height: 1.5;
}
details {
  padding: 12px 0;
  border-top: 1px solid #dae2d6;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
.line {
  padding: 11px 0;
  border-bottom: 1px solid #dbe3d7;
  display: grid;
  gap: 3px;
  font-size: 15px;
  line-height: 1.4;
}
.line strong {
  font-weight: 600;
}
.line span {
  color: #526757;
  overflow-wrap: anywhere;
}
.line.warn span {
  color: #80582d;
}
[hidden] {
  display: none !important;
}
@media (min-width: 640px) {
  header {
    margin-top: 24px;
  }
  main {
    padding-bottom: 16px;
  }
  .steps {
    margin-top: 14px;
  }
  .viewer {
    aspect-ratio: 1.55;
  }
}
@media (max-height: 700px) and (max-width: 639px) {
  header {
    height: 50px;
  }
  .steps {
    margin: 4px 0 12px;
  }
  #instruction {
    margin: 6px 0 10px;
  }
  .viewer {
    aspect-ratio: 1.65;
  }
  .controls {
    margin-top: 10px;
  }
}

figure {
  margin: 12px 0;
}
figure img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 6px;
}
figcaption {
  font-size: 13px;
  color: #56685c;
}
.line span {
  white-space: pre-line;
}

#lens-control {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #14291fe8;
  color: white;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
#lens {
  font: inherit;
  max-width: 145px;
  min-height: 36px;
  background: #193c2b;
  color: white;
  border: 0;
  border-radius: 4px;
}

#outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
