:root {
  color-scheme: light;
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #657282;
  --line: #d9dde3;
  --accent: #0f766e;
  --accent-strong: #0b5d56;
  --danger: #b42318;
  --wait: #8a5a00;
  --ok: #137333;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  border: 0;
  font: inherit;
}

.shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(31, 41, 51, 0.06);
}

.panel + .panel {
  margin-top: 14px;
}

.compact {
  padding-bottom: 8px;
}

.topbar,
.order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
}

.status-pill {
  min-width: 72px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
}

.status-pill.ok {
  border-color: rgba(19, 115, 51, 0.25);
  color: var(--ok);
  background: rgba(19, 115, 51, 0.08);
}

.status-pill.wait {
  border-color: rgba(138, 90, 0, 0.25);
  color: var(--wait);
  background: rgba(138, 90, 0, 0.08);
}

.status-pill.fail {
  border-color: rgba(180, 35, 24, 0.24);
  color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
}

.actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.primary,
.secondary,
.print-button {
  min-height: 46px;
  border-radius: 8px;
  padding: 0 16px;
}

.primary,
.print-button {
  color: #ffffff;
  background: var(--accent);
}

.primary:active,
.print-button:active {
  background: var(--accent-strong);
}

.secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: #ffffff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  min-height: 116px;
  margin-top: 14px;
}

.thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef1f4;
}

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

.thumb-index {
  position: absolute;
  left: 6px;
  top: 6px;
  min-width: 22px;
  border-radius: 999px;
  padding: 2px 6px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  font-size: 12px;
}

.thumb-remove {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  line-height: 28px;
}

.submit-area {
  margin-top: 14px;
}

.print-button {
  width: 100%;
  font-weight: 600;
}

.message {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.message.error {
  color: var(--danger);
}

.job-list {
  border-top: 1px solid var(--line);
}

.job-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.job-row strong {
  color: var(--text);
  font-weight: 600;
}

@media (min-width: 560px) {
  .shell {
    padding-top: 32px;
  }

  .thumb-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
