:root {
  --text: #111111;
  --muted: #666666;
  --line: #111111;
  --hairline: rgba(17, 17, 17, 0.25);
  --bad: #a11414;
  --good: #14671f;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--text);
  font-family: "Times New Roman", Times, serif;
}

.shell {
  width: min(760px, calc(100vw - 1.5rem));
  margin: 0 auto;
  padding: 1rem 0 3rem;
  padding-bottom: calc(3rem + env(safe-area-inset-bottom));
}

.masthead {
  padding: 1rem 0 1.25rem;
  border-bottom: 2px solid var(--line);
}

.brand {
  margin: 0 0 0.4rem;
  font-size: 1.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.eyebrow,
.label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.8rem;
  color: var(--muted);
}

h1 {
  margin: 1.5rem 0 1rem;
  font-size: clamp(2.5rem, 12vw, 4rem);
  line-height: 0.9;
  font-weight: 400;
  letter-spacing: -0.05em;
}

.hint {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
  margin: 0.4rem 0;
}

.stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin: 1.25rem 0;
}

input[type="text"],
input[type="password"],
input[type="url"],
textarea {
  width: 100%;
  padding: 0.85rem 0.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 0;
  font-family: inherit;
  font-size: 1.05rem;
  line-height: 1.4;
}

textarea {
  resize: vertical;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 0;
}

.btn-primary {
  background: var(--text);
  color: #ffffff;
}

.btn-secondary {
  border-width: 1px;
}

.btn-quiet {
  border: 0;
  min-height: 2.25rem;
  padding: 0.25rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn.full {
  width: 100%;
  margin-top: 1rem;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.error {
  margin: 0;
  color: var(--bad);
  font-size: 1rem;
}

/* Toolbar + tabs */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 2px solid var(--line);
}

.tabs {
  display: flex;
  gap: 1.25rem;
}

.tab {
  border: 0;
  background: transparent;
  padding: 0.35rem 0;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--line);
}

.count {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Bulk paste */
.bulk {
  margin: 1.25rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
}

.bulk summary {
  padding: 0.6rem 0;
  font-size: 1.05rem;
  cursor: pointer;
}

.bulk textarea {
  margin: 0.5rem 0 0.75rem;
}

/* Entries */
.entries {
  display: grid;
  gap: 0;
}

.entry {
  padding: 1.25rem 0;
  border-bottom: 2px solid var(--line);
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.entry-num {
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.entry .field {
  margin: 0.9rem 0;
}

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.shot {
  position: relative;
  width: 84px;
  height: 84px;
  border: 1px solid var(--hairline);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot button {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 0;
}

.file-label {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.file-label input {
  display: none;
}

/* Progress + queue */
.progress {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  font-size: 1rem;
}

.progress-row .ok {
  color: var(--good);
}

.progress-row .fail {
  color: var(--bad);
}

.queue-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 0.5rem;
}

.queue-list {
  display: grid;
  gap: 0;
}

.queue-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.queue-item p {
  margin: 0.25rem 0;
  font-size: 1.02rem;
  line-height: 1.4;
  word-break: break-word;
}

.queue-item .when {
  color: var(--muted);
  font-size: 0.9rem;
}

.queue-thumbs {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.queue-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid var(--hairline);
}

.foot {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

@media (max-width: 520px) {
  .btn {
    font-size: 0.82rem;
  }

  .entry-num {
    font-size: 1.25rem;
  }
}
