:root{
  --brand:#238077;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
}

#video{
  transform:scaleX(-1);
}

/* Captured preview itself is NOT CSS-mirrored.
   The mirrored effect comes from the saved image blob only. */
#photo-preview{
  transform:none;
}

.page-shell{
  width:100%;
  max-width:95%;
  margin:0 auto;
  padding:0.25rem;
}

.form-stack{
  display:flex;
  flex-direction:column;
  gap:1.25rem;
}

.fields-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
}

.camera-shell{
  background:#18181b;
  overflow:hidden;
}

.camera-container{
  position:relative;
  overflow:hidden;
  background:#000;
  width:100%;
  aspect-ratio:4/5;
  max-height:78vh;

}

.camera-media{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.flash{
  position:absolute;
  inset:0;
  background:white;
  opacity:0;
  pointer-events:none;
  transition:opacity 200ms;
}

.field-block label{
  display:block;
  font-size:.875rem;
  margin-bottom:.5rem;
}

.field-block input,
.field-block textarea{
  width:100%;
  padding:.85rem 1rem;
  background:#18181b;
  color:white;
  outline:none;
  border:none;
}

.field-block input:focus,
.field-block textarea:focus{
  box-shadow:0 0 0 2px var(--brand);
}

.field-span-2{
  grid-column:1/-1;
}

.submit-btn{
  background:var(--brand);
}

.submit-btn:hover{
  background:#1f6f68;
}

.corner-controls{
  position:absolute;
  right:.85rem;
  bottom:.85rem;
  z-index:20;
}

.flip-btn{
  display: none!important; /* Hidden by default, shown on mobile via JS */
  position:absolute;
  top:.85rem;
  right:.85rem;
  z-index:20;
  width:2.75rem;
  height:2.75rem;
  background:rgba(0,0,0,.35);
  backdrop-filter:blur(10px);
  border-radius:9999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.1rem;
  color:#fff;
  border:none;
}

.action-btn{
  width:4.4rem;
  height:4.4rem;
  background:#fff;
  color:#111;
  border-radius:9999px;
  box-shadow:0 18px 40px rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.55rem;
  border:3px solid var(--brand);
}

.action-btn:active{
  transform:scale(.95);
}

  .green-highlight{
    color: var(--brand)!important;
  }

@media (orientation:landscape) and (max-width:950px){

  .page-shell{
    max-width:100%;
    padding:.5rem .75rem;
  }

  .camera-container{
    aspect-ratio:auto;
    height:75vh;
    max-height:75vh;
    min-height:260px;
  }

  .fields-grid{
    grid-template-columns:1fr 1fr;
  }

  .form-stack{
    gap:.8rem;
  }

  h1{
    margin-bottom:1rem;
  }

}