:root {
  --paper: #fffaf8;
  --rose: #9a5f6b;
  --rose-dark: #74434d;
  --rose-soft: #f3dfe3;
  --ink: #3f3335;
  --muted: #796d70;
  --line: #dfc8cd;
  --success: #43664d;
  --error: #8a3e3e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(
      circle at 10% 10%,
      rgba(255, 255, 255, .85),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #f5e5e8,
      #ead2d7
    );
  font-family: "Montserrat", Arial, sans-serif;
}

.page {
  min-height: 100vh;
  padding: 22px 14px;
  display: grid;
  place-items: center;
}

.panel {
  width: min(100%, 620px);
  padding: clamp(26px, 7vw, 54px);
  background: var(--paper);
  border: 1px solid rgba(154, 95, 107, .25);
  border-radius: 28px;
  box-shadow: 0 18px 55px rgba(78, 42, 50, .15);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 115px;
  height: 115px;
  border: 1px solid rgba(154, 95, 107, .22);
  border-radius: 50%;
}

.panel::before {
  top: -58px;
  left: -58px;
}

.panel::after {
  right: -58px;
  bottom: -58px;
}

.ornament {
  color: var(--rose);
  font-size: 32px;
  line-height: 1;
}

.eyebrow {
  margin: 12px 0 6px;
  color: var(--rose);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
}

h1 {
  margin: 0;
  color: var(--rose-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.05;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: -.02em;
}

.intro {
  max-width: 460px;
  margin: 20px auto 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.field {
  display: block;
  margin: 15px 0;
  text-align: left;
}

.field > span {
  display: block;
  margin: 0 0 7px 3px;
  font-size: 13px;
  font-weight: 600;
}

.field small {
  color: var(--muted);
  font-weight: 400;
}

input[type="text"] {
  width: 100%;
  padding: 14px 15px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  font: inherit;
  font-size: 16px;
}

input[type="text"]:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(154, 95, 107, .12);
}

.picker {
  margin: 18px 0 14px;
}

.picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.pick-button {
  display: grid;
  gap: 5px;
  padding: 23px 15px;
  background: #fff6f5;
  border: 1.5px dashed var(--rose);
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform .15s,
    background .15s;
}

.pick-button:hover {
  background: var(--rose-soft);
}

.pick-button:active {
  transform: scale(.99);
}

.camera {
  font-size: 29px;
}

.pick-button strong {
  font-size: 14px;
}

.pick-button small {
  color: var(--muted);
}

.selection {
  margin: 14px 0;
  padding: 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
}

.selection-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.text-button {
  color: var(--rose-dark);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

#fileList {
  max-height: 180px;
  margin: 9px 0 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

#fileList li {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 7px 2px;
  border-top: 1px solid #eee4e6;
  font-size: 12px;
}

#fileList li span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#fileList li span:last-child {
  flex: 0 0 auto;
  color: var(--muted);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 17px 2px;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  line-height: 1.5;
}

.consent input {
  margin-top: 3px;
  accent-color: var(--rose);
}

.primary {
  width: 100%;
  padding: 15px 18px;
  color: white;
  background: var(--rose-dark);
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.primary:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
}

.progress {
  height: 10px;
  overflow: hidden;
  background: #eadcdf;
  border-radius: 99px;
}

.progress div {
  width: 0;
  height: 100%;
  background: var(--rose);
  border-radius: inherit;
  transition: width .2s;
}

.result {
  margin-top: 16px;
  padding: 13px;
  border-radius: 13px;
  font-size: 13px;
  line-height: 1.55;
}

.result.success {
  color: var(--success);
  background: #edf5ef;
}

.result.error {
  color: var(--error);
  background: #faecec;
}

.notice {
  margin: 15px 0;
  padding: 16px;
  color: var(--rose-dark);
  background: #fff2f1;
  border: 1px solid var(--line);
  border-radius: 14px;
  line-height: 1.6;
}

.quality-note {
  margin: 17px 8px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.footer-mark {
  margin-top: 23px;
  color: var(--rose);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  letter-spacing: .16em;
}

.hidden {
  display: none !important;
}

@media (max-width: 420px) {
  .page {
    padding: 0;
  }

  .panel {
    min-height: 100vh;
    padding: 28px 18px;
    border: 0;
    border-radius: 0;
  }

  h1 {
    font-size: clamp(27px, 9vw, 36px);
  }
}
