:root {
  color-scheme: light dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --desk: #e9e3d5;
  --desk-deep: #ddd5c2;
  --paper: #f8f1e0;
  --paper-raised: #fdf8ec;
  --edge: #d3c39e;
  --ink: #2e2a20;
  --ink-soft: #6f6754;
  --accent: #1f5240;
  --accent-hover: #29684f;
  --accent-ink: #f4f7f2;
  --alert: #a03c2a;
  --focus: #8a6d2f;
  background: radial-gradient(ellipse at 50% -20%, var(--desk) 55%, var(--desk-deep) 100%) fixed var(--desk);
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --desk: #24211a;
    --desk-deep: #1b1914;
    --paper: #322d22;
    --paper-raised: #3a3428;
    --edge: #55492f;
    --ink: #ece5d2;
    --ink-soft: #a89d82;
    --accent: #3d8265;
    --accent-hover: #4a9878;
    --accent-ink: #f0f6f1;
    --alert: #e08568;
    --focus: #c9a75a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px 24px 24px;
}

.panel {
  position: relative;
  width: min(100%, 620px);
  border: 1px solid var(--edge);
  background: var(--paper);
  padding: 32px;
  border-radius: 4px 12px 12px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 35%) inset, 0 18px 44px rgb(56 46 24 / 18%);
}

/* Manila folder tab peeking out behind the top-left of the card. */
.panel::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 26px;
  width: 132px;
  height: 30px;
  background: var(--paper);
  border: 1px solid var(--edge);
  border-bottom: none;
  border-radius: 10px 14px 0 0;
  box-shadow: 0 -4px 10px rgb(56 46 24 / 7%);
  z-index: -1;
}

.wide {
  width: min(100%, 760px);
}

.masthead {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}

.glyph {
  width: 44px;
  height: 44px;
  fill: var(--accent);
  flex: none;
}

h1 {
  margin: 0;
  font-size: 42px;
  line-height: 1.05;
  font-weight: 750;
  letter-spacing: -0.5px;
}

.tagline {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

.actions,
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stack {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

button,
input {
  min-height: 44px;
  border-radius: 8px;
  font: inherit;
}

button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 18px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(31 82 64 / 25%);
}

button:active {
  transform: translateY(0);
  box-shadow: none;
}

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

button.secondary {
  background: var(--paper-raised);
  color: var(--accent);
}

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

button.copy {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
  flex: none;
  align-self: center;
}

input {
  width: 100%;
  border: 1px solid var(--edge);
  padding: 0 12px;
  background: var(--paper-raised);
  color: var(--ink);
}

label {
  display: block;
  margin-top: 18px;
  margin-bottom: 7px;
  font-weight: 700;
}

output,
.mono {
  display: block;
  width: 100%;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
  background: var(--paper-raised);
  border: 1px solid var(--edge);
  border-radius: 8px;
  padding: 12px;
}

.mono {
  color: var(--ink-soft);
}

.field-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.field-row output {
  flex: 1;
}

.result {
  margin-top: 24px;
}

.notice {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid var(--focus);
  background: var(--paper-raised);
  border-radius: 0 8px 8px 0;
}

.status {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--alert);
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  margin-top: 4px;
  padding: 34px 20px;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 600;
  border: 2px dashed var(--edge);
  border-radius: 10px;
  background: var(--paper-raised);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.dropzone.drag,
.dropzone:hover,
.dropzone:focus-within {
  border-color: var(--accent);
  color: var(--accent);
}

.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.files {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--paper-raised);
  border: 1px solid var(--edge);
  border-radius: 8px;
}

.file-name {
  flex: 1;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}

.file-row button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 14px;
  flex: none;
}

.file-warning {
  margin: 0;
  color: var(--alert);
}

.empty {
  margin: 0;
  color: var(--ink-soft);
}

.hidden {
  display: none !important;
}

@media (max-width: 520px) {
  .panel {
    padding: 22px;
  }

  h1 {
    font-size: 34px;
  }

  .glyph {
    width: 36px;
    height: 36px;
  }

  button {
    width: 100%;
  }

  button.copy,
  .file-row button {
    width: auto;
  }
}
