:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6873;
  --line: #dce3e8;
  --panel: #ffffff;
  --wash: #f4f7f9;
  --accent: #145ea8;
  --accent-dark: #0d477f;
  --good: #1d7040;
  --warning: #8a5800;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--wash);
  min-width: 0;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  min-width: 0;
}

.page-shell {
  width: min(100% - 24px, 760px);
  margin: 0 auto;
  padding: 24px 0 56px;
}

.page-header {
  margin-bottom: 20px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1, h2, h3, p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.8rem, 8vw, 2.7rem);
  line-height: 1.08;
  margin: 0;
}

h2 {
  font-size: 1.05rem;
  line-height: 1.2;
  margin: 0;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 6px 0 8px;
}

.intro {
  color: var(--muted);
  margin: 8px 0 0;
}

.instructions,
.progress-panel,
.slot-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgb(23 32 42 / 5%);
}

.instructions {
  padding: 16px 18px 14px;
}

.instructions ul {
  color: var(--muted);
  margin: 8px 0 0;
  padding-left: 20px;
}

.instructions li + li {
  margin-top: 4px;
}

.progress-panel {
  margin: 14px 0 22px;
  padding: 14px 18px 16px;
}

.progress-row {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

#progress {
  color: var(--accent-dark);
  font-size: 0.95rem;
  white-space: nowrap;
}

progress {
  appearance: none;
  background: #e7edf2;
  border: 0;
  border-radius: 99px;
  display: block;
  height: 12px;
  margin-top: 10px;
  overflow: hidden;
  width: 100%;
}

progress::-webkit-progress-bar {
  background: #e7edf2;
  border-radius: 99px;
}

progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 99px;
}

progress::-moz-progress-bar {
  background: var(--accent);
  border-radius: 99px;
}

.message {
  color: var(--warning);
  min-height: 1.5em;
  margin: 0 0 12px;
}

.round-header {
  margin: 22px 2px 9px;
}

.round-header:first-child {
  margin-top: 0;
}

.round-header h2 {
  font-size: 1.2rem;
}

.round-header p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 3px 0 0;
}

.slot-card {
  margin: 10px 0;
  padding: 16px;
}

.slot-topline {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.slot-number {
  color: var(--accent-dark);
  font-size: 1.35rem;
  font-weight: 800;
}

.orientation {
  border: 1px solid #b9c9d7;
  border-radius: 999px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 3px 9px;
}

.slot-status {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 12px;
}

.slot-card.is-uploaded .slot-status {
  color: var(--good);
  font-weight: 700;
}

.thumbnail {
  background: #edf2f5;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  height: auto;
  margin: 0 0 12px;
  max-height: 360px;
  object-fit: contain;
  width: 100%;
}

.slot-feedback {
  color: var(--warning);
  font-size: 0.9rem;
  margin: 0 0 10px;
}

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

.photo-button {
  align-items: center;
  background: var(--accent);
  border-radius: 10px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 1.12rem;
  font-weight: 750;
  justify-content: center;
  min-height: 54px;
  padding: 12px 16px;
  text-align: center;
  touch-action: manipulation;
  transition: background 120ms ease, transform 120ms ease;
  user-select: none;
  width: 100%;
}

.photo-button:hover,
.photo-button:focus-visible {
  background: var(--accent-dark);
}

.photo-button:active {
  transform: translateY(1px);
}

.photo-button.is-busy {
  cursor: wait;
  opacity: 0.65;
}

@media (min-width: 620px) {
  .page-shell {
    padding-top: 36px;
  }

  .slot-card {
    padding: 18px 20px;
  }
}
