:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #202621;
  background: #f3f4ef;
  font-synthesis: none;
  --ink: #202621;
  --muted: #566058;
  --line: #d9dfd6;
  --accent: #c9f477;
  --deep: #273c2a;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, a.download { touch-action: manipulation; }
:focus-visible { outline: 3px solid #385b39; outline-offset: 4px; }

.top { border-bottom: 1px solid #e1e4dc; background: #f9faf6; }
.top-inner {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 1100px;
  min-height: 62px;
  margin: 0 auto;
  padding: 0 24px;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -.025em;
}
.brand-mark { position: relative; width: 23px; height: 23px; overflow: hidden; border-radius: 6px; background: var(--deep); }
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 27px;
  height: 4px;
  background: var(--accent);
  transform: rotate(-48deg);
}
.brand-mark::before { top: 9px; }
.brand-mark::after { top: 16px; left: 3px; }

main { width: min(100% - 36px, 584px); margin: clamp(38px, 8vh, 88px) auto 40px; }
.intro { margin-bottom: 27px; }
h1 { margin: 0 0 10px; font-size: clamp(2.25rem, 6.8vw, 3.4rem); line-height: 1.03; letter-spacing: -.062em; font-weight: 780; }
.intro p { margin: 0; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.card { padding: clamp(16px, 4.5vw, 27px); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 12px 35px #293a2710; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }

.upload { position: relative; }
#file, .formats input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 154px;
  gap: 7px;
  padding: 19px;
  text-align: center;
  border: 1px dashed #9fae9c;
  border-radius: 13px;
  background: #f8faf6;
  cursor: pointer;
}
.drop:hover, .drop.drag-over { border-color: #53774e; background: #eff6e8; }
#file:focus-visible + .drop, .formats input:focus-visible + span { outline: 3px solid #385b39; outline-offset: 3px; }
fieldset:disabled .drop { cursor: default; }
fieldset:disabled .drop:hover { border-color: #9fae9c; background: #f8faf6; }
.upload-icon { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 3px; border-radius: 11px; background: #e8f0e3; }
.upload-icon span { position: relative; width: 18px; height: 15px; margin-top: 6px; border: 2px solid #466143; border-top: 0; border-radius: 0 0 4px 4px; }
.upload-icon span::before, .upload-icon span::after { content: ""; position: absolute; }
.upload-icon span::before { width: 2px; height: 13px; top: -7px; left: 6px; background: #466143; }
.upload-icon span::after { top: -7px; left: 3px; width: 6px; height: 6px; border: solid #466143; border-width: 2px 0 0 2px; transform: rotate(45deg); }
.file-title { max-width: 100%; overflow-wrap: anywhere; font-size: .98rem; font-weight: 720; }
.hint, .file-limit { color: var(--muted); font-size: .8rem; }
.file-limit { margin: 8px 0 22px; }

.options { display: grid; grid-template-columns: minmax(112px, 2fr) minmax(175px, 3fr); gap: 16px; }
.field-label { display: block; margin: 0 0 8px; padding: 0; font-size: .85rem; font-weight: 720; }
.size-field, .formats { display: flex; min-height: 47px; border: 1px solid var(--line); border-radius: 9px; }
.size-field { align-items: center; background: #fff; }
.size-field input { width: 100%; min-width: 0; padding: 11px 0 11px 12px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; font-weight: 670; }
.size-field > span { margin: 0 12px 0 8px; color: var(--muted); font-size: .81rem; font-weight: 650; }
.formats { gap: 3px; padding: 3px; background: #f6f8f4; }
.formats label { display: flex; flex: 1; position: relative; min-width: 0; cursor: pointer; }
.formats label span { display: grid; flex: 1; place-items: center; border-radius: 6px; color: #4a564b; font-size: .86rem; font-weight: 680; }
.formats input:checked + span { color: white; background: var(--deep); }
fieldset:disabled .formats label { cursor: default; }

.primary, .download { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; border-radius: 10px; cursor: pointer; font-weight: 750; text-decoration: none; }
.primary { width: 100%; min-height: 51px; margin-top: 23px; padding: 10px 15px; color: #263322; background: var(--accent); }
.primary:hover:not(:disabled), .download:hover { background: #bcec64; }
.primary:disabled { cursor: default; color: #4e5b4c; background: #e9eee5; }
.primary span, .download span { font-size: 1.12rem; }
.footnote { margin: 16px 3px 0; color: var(--muted); font-size: .8rem; line-height: 1.5; }

.activity { margin-top: 19px; }
.status-line { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: .87rem; }
.status-line p { margin: 0 0 7px; }
#percent { color: var(--muted); font-variant-numeric: tabular-nums; }
progress { display: block; width: 100%; height: 8px; accent-color: #577b47; }
.text-button { display: block; margin: 10px 0 0 auto; padding: 7px 0 4px 10px; border: 0; background: none; color: var(--deep); text-decoration: underline; cursor: pointer; font-size: .84rem; }
.error { margin: 13px 0 0; padding: 11px 13px; border-radius: 8px; background: #fff0ed; color: #8a3023; font-size: .9rem; }
.result { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; margin-top: 16px; padding: 14px; border: 1px solid #cfdcc8; border-radius: 11px; background: #f1f6ec; }
.result h2 { margin: 0 0 4px; font-size: .99rem; }
.result p { margin: 0; color: var(--muted); font-size: .82rem; }
.download { padding: 10px 12px; color: #263322; background: var(--accent); font-size: .86rem; }
.result .expiry { grid-column: 1 / -1; font-size: .75rem; }

@media (max-width: 365px) {
  .options { grid-template-columns: 1fr; gap: 13px; }
  .result { grid-template-columns: 1fr; }
  .download { justify-content: center; }
}
