:root {
  color-scheme: light;
  --paper: #f2f5f0;
  --ink: #14281f;
  --muted: #4c6158;
  --line: #c7d9cc;
  --surface: #fbfdfa;
  --accent: #285747;
  --highlight: #cde7ab;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, sans-serif;
}

.workspace {
  width: min(100% - 3rem, 64rem);
  min-height: 26rem;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 5rem);
  padding: 3rem 0;
}

.intro { padding-top: 1.5rem; }
h1 {
  margin: 0;
  font-family: "Iowan Old Style", "Georgia", serif;
  font-weight: 500;
  font-size: clamp(2.7rem, 6vw, 5.2rem);
  line-height: .98;
  letter-spacing: -.05em;
}

.intro p {
  margin: 1.35rem 0 0;
  max-width: 27ch;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.5;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  padding: clamp(1rem, 3vw, 1.65rem);
}

.drop {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: .55rem;
  min-height: 14rem;
  padding: 1rem;
  border: 1px dashed #8dab97;
  border-radius: .8rem;
  background: #ecf4ed;
  text-align: center;
  cursor: pointer;
}

.drop:hover, .drop.dragging { background: #e2efe3; }
.drop.has-file { border-style: solid; border-color: #6c957d; background: #e7f2e9; }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { display: block; max-width: 100%; overflow-wrap: anywhere; font-size: 1.15rem; }
#file-size { font-size: .88rem; color: var(--muted); }
.file-ready {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  border-radius: 1rem;
  padding: .3rem .65rem;
  background: var(--highlight);
  color: var(--ink);
  font-size: .83rem;
  font-weight: 650;
}
.wave { display: flex; height: 3rem; align-items: center; gap: .27rem; margin-bottom: .4rem; }
.wave i { width: .31rem; height: 44%; border-radius: 1rem; background: var(--accent); }
.wave i:nth-child(2n) { height: 65%; }
.wave i:nth-child(3n) { height: 86%; }
.wave i:nth-child(4) { height: 100%; }

.controls { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .95rem; }
button, .button {
  border: 0;
  border-radius: .55rem;
  padding: .75rem 1.05rem;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button:disabled { opacity: .44; cursor: default; }
button:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.button { color: var(--ink); background: var(--highlight); }
.activity { margin-top: 1rem; }
progress { width: 100%; height: .5rem; accent-color: var(--accent); }
.activity p { margin: .45rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.activity.error p { color: #7a3030; }

@media (max-width: 46rem) {
  .workspace { grid-template-columns: minmax(0, 1fr); width: min(100% - 2rem, 30rem); min-height: 0; }
  .intro { padding-top: 0; }
  .intro h1 br { display: none; }
  .intro p { max-width: 34ch; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}
