:root {
  --bg: #f6f5f2;
  --text: #16181d;
  --muted: #5d6370;
  --accent: #e4572e;
  --accent-dark: #c44722;
  --card: #ffffff;
  --line: #e4e0d8;
  --soft: #fbfaf7;
  --danger: #9f2d2d;
  --danger-bg: #fdecea;
  --ok: #1f7a4d;
  --shadow: 0 1px 2px rgba(22, 24, 29, 0.04), 0 12px 32px rgba(22, 24, 29, 0.05);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  min-height: 100dvh;
  padding:
    env(safe-area-inset-top)
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
  -webkit-tap-highlight-color: transparent;
}

button, input, textarea { font: inherit; color: inherit; }

.page {
  width: min(100%, 40rem);
  margin: 0 auto;
  padding: 20px 20px 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
}

.wordmark {
  margin: 0;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.wordmark span { color: var(--accent); }

main { flex: 1; }

h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 1.05rem;
}

.card {
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.stack { display: flex; flex-direction: column; gap: 14px; }

label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }

.hint, .file-meta, .foot, .check-note {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.92rem;
}

input[type="email"], textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 16px;
  font-weight: 400;
}

textarea { min-height: 112px; resize: vertical; }

input:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button, .text-button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.button:hover { background: var(--accent-dark); }

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

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

.text-button {
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  min-height: 44px;
  padding: 8px 2px;
}

.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 132px;
  padding: 22px 16px;
  border: 1.5px dashed #d5d0c6;
  border-radius: 18px;
  background: var(--soft);
  text-align: center;
}

.drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}

.drop-title { font-weight: 700; }

.drop-hint { color: var(--muted); font-size: 0.92rem; }

.files { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }

.file {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.file-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.file-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.file-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  min-height: 44px;
  padding: 0 2px;
  cursor: pointer;
}

.bar {
  height: 8px;
  border-radius: 99px;
  background: #eceae4;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

.file-status { color: var(--muted); font-size: 0.88rem; }

.banner {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff4ef;
  color: var(--text);
}

.banner p { margin: 0 0 10px; }

.error {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  font-weight: 600;
}

.overall { font-weight: 700; }

.done-mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e7f6ee;
  color: var(--ok);
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.foot {
  margin-top: 28px;
  font-size: 0.85rem;
}

.actions { display: flex; flex-direction: column; gap: 8px; }

@media (min-width: 800px) {
  .page { padding-top: 48px; }
  h1 { font-size: 2.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bar > span { transition: none; }
}
