* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #e8e3db;
  color: #262723;
  font-family: Arial, Helvetica, sans-serif;
}

.shell {
  max-width: 520px;
  min-height: 100dvh;
  margin: auto;
  background: #f6f2ec;
  display: flex;
  flex-direction: column;
  padding: 25px 24px 20px;
}

header,
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 700;
}

footer {
  margin-top: auto;
  padding-top: 30px;
  justify-content: center;
  color: #77766e;
}

.page {
  display: none;
  flex: 1;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}

.page.active {
  display: flex;
}

.eyebrow {
  letter-spacing: 3px;
  font-size: 10px;
  margin: 20px 0 28px;
  color: #89877e;
}

.icon {
  font-size: 70px;
  color: #77776e;
  margin-bottom: 20px;
}

h1 {
  font-family: Georgia, serif;
  font-size: clamp(35px, 9vw, 53px);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 24px;
}

h1 em {
  font-weight: 400;
}

h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 42px;
  margin: 0 0 20px;
}

p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
  color: #66665e;
  margin: 0 0 32px;
}

button {
  border: 0;
  background: #292b27;
  color: white;
  padding: 17px 24px;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 2px;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

small {
  font-size: 11px;
  color: #88867d;
  margin-top: 20px;
}

.viewfinder {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #252525;
  overflow: hidden;
}

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

.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: #fff;
}

.tl {
  top: 12px;
  left: 12px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.tr {
  top: 12px;
  right: 12px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.br {
  bottom: 12px;
  right: 12px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

.controls {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0;
}

.secondary {
  background: transparent;
  color: #333;
  padding: 14px 4px;
}

.shutter {
  height: 70px;
  width: 70px;
  border-radius: 50%;
  border: 5px solid #f6f2ec;
  outline: 2px solid #292b27;
  background: #292b27;
  padding: 0;
}

#error {
  color: #a33;
  font-size: 12px;
  line-height: 1.5;
}

#photo {
  max-width: 100%;
  max-height: 55dvh;
  object-fit: contain;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  width: 100%;
}

.actions button {
  min-width: 0;
}

.actions .secondary {
  flex-shrink: 0;
}

.actions #save {
  flex: 1;
}

.upload-button {
  width: 100%;
  margin-top: 14px;
  padding: 18px 20px;
  background: transparent;
  border: 1px solid #292b27;
  color: #292b27;
  font-size: 12px;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
}

.upload-button:active {
  background: #292b27;
  color: #ffffff;
}

.upload-status {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: #77766e;
  overflow-wrap: anywhere;
}

.upload-status:empty {
  display: none;
}

.upload-status.success {
  color: #386a49;
}

.upload-status.error {
  color: #a33;
}

.note {
  font-size: 11px;
  margin: 25px 0 0;
}

@media (max-width: 380px) {
  .shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .actions {
    gap: 10px;
  }

  .actions button {
    font-size: 11px;
    padding: 15px 12px;
  }

  .actions .secondary {
    padding-left: 4px;
    padding-right: 4px;
  }
}
