:root {
  font-family: system-ui, sans-serif;
  color: #26372e;
  background: #f5f6f2;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
}

main {
  max-width: 820px;
  margin: 0 auto;
  padding: 36px 24px;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 32px;
  letter-spacing: -1px;
}

h1 span {
  margin-left: 12px;
  color: #64843d;
}

h2 {
  font-size: 19px;
  margin-bottom: 20px;
}

a {
  color: inherit;
}


header, .section-heading, .share-control, li, .file-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

header {
  padding-bottom: 24px;
  border-bottom: 1px solid #dde2d9;
}

header p, small, .hint, #empty-state {
  color: #707a72;
}

section {
  margin-top: 24px;
  padding: 24px;
  background: white;
  border: 1px solid #dde2d9;
  border-radius: 12px;
}

#login-view {
  max-width: 420px;
  margin: 40px auto;
}

#message {
  margin-top: 20px;
  overflow-wrap: anywhere;
}

#message:empty {
  display: none;
}

fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}


input, select, button {
  font: inherit;
  border: 1px solid #cbd4c3;
  border-radius: 7px;
  padding: 10px 12px;
}

input, select {
  width: 100%;
  min-width: 0;
  background: #fafbf8;
  color: inherit;
}

input[type="file"] {
  padding: 16px;
  border-style: dashed;
}

button {
  cursor: pointer;
  background: #edf2e6;
  color: #26372e;
  white-space: nowrap;
}

button:hover {
  background: #dde8d0;
}

button[type="submit"] {
  margin-top: 20px;
  background: #2c4033;
  color: white;
}

button[type="submit"]:hover {
  background: #405b49;
}

button:disabled, fieldset:disabled {
  opacity: .6;
}

button:disabled {
  cursor: wait;
}

:focus-visible {
  outline: 3px solid #7ca451;
  outline-offset: 3px;
}


.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.display-name-control {
  margin-top: 20px;
}

.link-toggle legend {
  padding: 0;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 600;
}

.toggle-options {
  position: relative;
  display: flex;
  border: 1px solid #cbd4c3;
  border-radius: 7px;
  overflow: hidden;
}

.toggle-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle-options label {
  flex: 1;
  margin: 0;
  padding: 10px 8px;
  background: #fafbf8;
  text-align: center;
  cursor: pointer;
}

.toggle-options input:checked + label {
  background: #2c4033;
  color: white;
}

.toggle-options input:focus-visible + label {
  outline: 3px solid #7ca451;
  outline-offset: -3px;
}

small {
  display: block;
  font-size: 12px;
  margin-top: 6px;
}

.hint {
  margin-top: 18px;
  font-size: 12px;
}

#upload-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

progress {
  flex: 1;
  width: 100%;
  accent-color: #64843d;
}

#share-result {
  background: #edf6df;
}

.share-control input {
  font-family: monospace;
}

.section-heading {
  margin-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  padding: 18px 0;
  border-top: 1px solid #e7eae3;
}

li:first-child {
  border-top: 0;
}

.file-info {
  min-width: 0;
}

.filename {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.file-actions {
  flex-shrink: 0;
}

.file-actions button {
  font-size: 12px;
}

.delete {
  color: #9a3c30;
  background: #fff5f2;
}

.delete:hover {
  background: #f8e4dd;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}


@media (max-width: 600px) {
  main {
    padding: 24px 16px;
  }

  section {
    padding: 20px;
  }

  .options {
    grid-template-columns: 1fr;
  }

  li {
    align-items: flex-start;
    flex-direction: column;
  }

  .share-control {
    flex-wrap: wrap;
  }

  .share-control input {
    flex-basis: 100%;
  }

}
