:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #24372b;
  background: #e4e7de;
  --forest: #203b2b;
  --forest-dark: #172f22;
  --fern: #50705b;
  --leaf: #91aa65;
  --muted: #485e50;
  --border: #bdcbbd;
  --error: #98462f;
  --surface: #f8faf4;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse at 53% 7%, #eff4e6 0%, transparent 67%), #e4e7de;
}
main {
  width: min(100%, 37rem);
  margin: 0 auto;
  padding: max(1.75rem, env(safe-area-inset-top)) 1rem max(2rem, env(safe-area-inset-bottom));
}
.brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto .9rem;
}
.brand img {
  display: block;
  width: clamp(8.8rem, 38vw, 12rem);
  height: auto;
}
.panel {
  padding: clamp(1.2rem, 5.5vw, 2.1rem);
  border: 1px solid #bdcbbd;
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: 0 12px 36px #21372716, 0 2px 8px #2137270a;
}
h1 {
  margin: 0;
  font: 600 clamp(1.95rem, 7.2vw, 2.9rem)/1.05 Georgia, serif;
  letter-spacing: -.035em;
  color: var(--forest-dark);
}
.intro {
  margin: .65rem 0 0;
  line-height: 1.45;
  color: var(--muted);
}
#portal { margin-top: 1.35rem; }
button, input { font: inherit; }
.picker, .action, .row-action {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .42rem;
  min-height: 2.85rem;
  border: 1px solid transparent;
  border-radius: .8rem;
  line-height: 1.25;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.primary {
  min-height: 4rem;
  padding: .7rem;
  background: var(--forest);
  color: #fff;
  font-size: 1.11rem;
}
.primary:hover, .action:hover:not(:disabled) { background: var(--forest-dark); }
.picker-symbol { color: #c7d89c; font-size: 1.45rem; }
.capture {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  margin-top: .55rem;
}
.secondary {
  background: #edf2e7;
  color: var(--forest);
  border-color: #c8d2c3;
  padding: .42rem .35rem;
  font-size: .91rem;
}
.secondary:hover { background: #e3ebda; }
.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
#portal:has(#library:focus-visible) label[for="library"],
#portal:has(#camera-photo:focus-visible) label[for="camera-photo"],
#portal:has(#camera-video:focus-visible) label[for="camera-video"],
button:focus-visible, input:focus-visible {
  outline: 3px solid var(--fern);
  outline-offset: 3px;
}
.help {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.45;
  margin: .55rem 0 0;
}
.help:empty { display: none; }
form { margin-top: 1.25rem; }
.field { margin-bottom: .95rem; }
.field label { display: block; margin-bottom: .38rem; font-weight: 680; }
.field label span {
  margin-left: .24rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 500;
}
.field input {
  width: 100%;
  min-height: 2.85rem;
  padding: .5rem .7rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  color: var(--forest-dark);
  background: #fff;
  font-size: 1rem;
}
.action {
  width: 100%;
  min-height: 3.15rem;
  margin-top: 1.15rem;
  padding: .55rem .8rem;
  color: #fff;
  background: var(--forest);
}
.action:disabled { color: #505b50; background: #dfe6dc; cursor: default; }
.queue {
  display: grid;
  list-style: none;
  gap: .55rem;
  padding: 0;
  margin: 1rem 0 0;
}
.queue li {
  min-width: 0;
  padding: .7rem .75rem;
  border: 1px solid #d0dacb;
  border-radius: .75rem;
  background: #eef3e9;
}
.row-main { display: flex; align-items: center; gap: .5rem; }
.row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row-title { display: block; font-size: .92rem; }
.row-detail { display: block; color: var(--muted); font-size: .81rem; margin-top: .22rem; }
.row-action {
  padding: .32rem .62rem;
  min-height: 2.75rem;
  background: var(--surface);
  border-color: var(--border);
  color: var(--forest);
  font-size: .85rem;
}
.row-action:hover { background: #e5eddf; }
progress {
  display: block;
  accent-color: var(--fern);
  width: 100%;
  height: .55rem;
  margin-top: .52rem;
}
.queue li[data-state="processed"] { background: #e6f0e2; }
.queue li:is([data-state="rejected"], [data-state="expired"]) .row-detail { color: var(--error); }
@media (min-width: 45rem) {
  main { padding-top: 2.3rem; }
  .brand { margin-bottom: 1rem; }
}
