*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #1c1914;
  background: #f6f1e8;
}

.page {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-flex: 1;
  flex: 1;
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

.logo-wrap {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-align-items: center;
  align-items: center;
  padding: 0.65rem 1.25rem;
  padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
}

.logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 4.5rem;
  object-fit: contain;
}

.main {
  -webkit-flex: 1;
  flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.form {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.preview-wrap {
  margin: 0 0 1.25rem;
  background: #efe8d9;
  border-radius: 0.75rem;
  overflow: hidden;
  text-align: center;
}

.preview {
  display: block;
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  vertical-align: middle;
  background: #efe8d9;
}

.status {
  min-height: 1.5em;
  margin: 0 0 0.75rem;
  text-align: center;
  font-size: 1rem;
}

.status-error {
  color: #8a1f11;
}

.status-ok {
  color: #1f6b3a;
}

.progress-wrap {
  height: 0.5rem;
  margin: 0 0 1.25rem;
  overflow: hidden;
  background: #e4dccb;
  border-radius: 999px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: #1c1914;
  border-radius: 999px;
}

.actions {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.btn {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 1.15rem;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.015em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-transition: -webkit-transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:last-child {
  margin-bottom: 0;
}

.btn-icon {
  display: block;
  width: 1.4em;
  height: 1.4em;
  margin-right: 0.55rem;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.btn-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn-primary {
  color: #1c1914;
  border-color: rgba(140, 100, 10, 0.35);
  background-color: #f5d547;
  background-image: -webkit-radial-gradient(50% 0%, ellipse cover, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%), -webkit-linear-gradient(top, #ffe97a 0%, #f3c01d 100%);
  background-image: radial-gradient(ellipse 90% 80% at 50% 0%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%), linear-gradient(180deg, #ffe97a 0%, #f3c01d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 0 rgba(176, 120, 8, 0.18),
    0 2px 4px rgba(28, 25, 20, 0.08),
    0 10px 20px rgba(201, 150, 20, 0.32),
    0 22px 36px rgba(28, 25, 20, 0.08);
}

.btn-primary:active {
  -webkit-transform: scale(0.98);
  transform: scale(0.98);
  filter: saturate(1.05);
  box-shadow:
    inset 0 3px 10px rgba(120, 80, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 1px 2px rgba(28, 25, 20, 0.08);
}

.btn-secondary {
  color: #1c1914;
  border-color: rgba(28, 25, 20, 0.12);
  background: #fffaf0;
  background: -webkit-linear-gradient(top, #fffdf8 0%, #f3ead8 100%);
  background: linear-gradient(180deg, #fffdf8 0%, #f3ead8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 6px 14px rgba(28, 25, 20, 0.08);
}

.btn-secondary:active {
  -webkit-transform: scale(0.985);
  transform: scale(0.985);
  box-shadow:
    inset 0 2px 8px rgba(28, 25, 20, 0.12),
    0 1px 2px rgba(28, 25, 20, 0.06);
}

.btn:focus {
  outline: none;
}

.btn:focus-visible {
  outline: 3px solid #1c1914;
  outline-offset: 3px;
}

.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

@media (hover: hover) {
  .btn-primary:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.75),
      inset 0 -1px 0 rgba(176, 120, 8, 0.18),
      0 4px 8px rgba(28, 25, 20, 0.08),
      0 14px 28px rgba(201, 150, 20, 0.38),
      0 28px 44px rgba(28, 25, 20, 0.1);
  }

  .btn-primary:hover:active,
  .btn-secondary:hover:active {
    -webkit-transform: scale(0.98);
    transform: scale(0.98);
  }

  .btn-secondary:hover {
    -webkit-transform: translateY(-1px);
    transform: translateY(-1px);
  }
}

.note {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin: 0.15rem 0 0;
  color: #8a8274;
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: center;
}

.note-icon {
  display: block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.4rem;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.note-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

[hidden] {
  display: none !important;
}
