* { box-sizing: border-box; }
body { margin: 0; background: #f1f7f5; color: #173634; font: 16px/1.5 "DM Sans", system-ui, sans-serif; }
main { width: min(100% - 32px, 660px); margin: clamp(20px, 7vw, 72px) auto; }
header { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 800; margin-bottom: 18px; color: #166458; }
header img { display: block; border-radius: 9px; }
section { background: white; border: 1px solid #dce9e4; border-radius: 24px; padding: clamp(20px, 5vw, 38px); }
h1 { font-size: clamp(26px, 6vw, 36px); line-height: 1.15; margin: 0 0 12px; }
p, .form-row { margin: 0 0 16px; }
label { display: block; margin-bottom: 6px; font-weight: 650; }
input, select, textarea { display: block; width: 100%; padding: 10px 12px; font: inherit; color: inherit; background: #fcfefd; border: 1px solid #aabeb8; border-radius: 9px; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #4ba995; outline-offset: 2px; }
fieldset { border: 1px solid #dce9e4; border-radius: 12px; margin: 0 0 18px; padding: 12px; }
legend { padding: 0 5px; font-weight: 650; }
.help { display: block; color: #45605b; margin-top: 5px; }
.errorlist { color: #a02324; margin: 6px 0; padding-left: 20px; }
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
button { width: 100%; font: inherit; font-weight: 700; color: white; background: #17695d; padding: 12px; border: 0; border-radius: 10px; cursor: pointer; }
a { color: #166458; }
  
.errorlist { margin-bottom: 16px; }
button:disabled { opacity: .65; cursor: default; }
#receipt { overflow-wrap: anywhere; }
.required-mark { color: #b42324; }

select {
  appearance: none;
  padding-inline-end: 42px;
  background-image:
    linear-gradient(45deg, transparent 50%, #365953 50%),
    linear-gradient(135deg, #365953 50%, transparent 50%);
  background-position: right 22px center, right 16px center;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

@media (forced-colors: active) {
  select {
    appearance: auto;
    background-image: none;
  }
}

.field-label { display: block; margin-bottom: 6px; font-weight: 650; }
.order-code {
  display: grid;
  grid-template-columns: auto 5ch auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #aabeb8;
  border-radius: 9px;
  background: #fcfefd;
}
.order-code > span { color: #45605b; }
.order-prefix { font-weight: 650; white-space: nowrap; }
.order-code input {
  min-width: 0;
  padding: 10px 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.order-code input:focus { outline: none; }
.order-code:focus-within { outline: 3px solid #4ba995; outline-offset: 2px; }

.refund-inputs { min-inline-size: 0; border: 0; padding: 0; margin: 0; }

.primary-label::before {
  content: "";
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  margin-inline-end: 0.45em;
  vertical-align: 0.12em;
  border-radius: 50%;
  background: #17695d;
}

.photo-previews:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block: 12px 4px;
}
.photo-preview {
  position: relative;
  width: 96px;
  height: 96px;
}
.photo-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f4f8f6;
  border: 1px solid #aabeb8;
  border-radius: 9px;
}
.photo-remove {
  position: absolute;
  inset: 4px 4px auto auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #aabeb8;
  border-radius: 50%;
  background: #fff;
  color: #173634;
  font-size: 20px;
  line-height: 1;
}

.photo-picker { position: relative; }
.photo-picker-button {
  display: inline-block;
  margin: 0;
  padding: 9px 14px;
  border: 1px solid #aabeb8;
  border-radius: 9px;
  background: #fcfefd;
  cursor: pointer;
}
.photo-picker-button:hover { background: #f1f7f5; }
.photo-picker:focus-within .photo-picker-button {
  outline: 3px solid #4ba995;
  outline-offset: 2px;
}

.copy-receipt {
  width: auto;
  display: block;
  margin-block-end: 16px;
  padding: 8px 12px;
  border: 1px solid #aabeb8;
  background: #fcfefd;
  color: #166458;
}
