:root {
  --ink: #111214;
  --paper: #fff;
  --muted: #68707c;
  --hair: #c9cdd3;
  --accent: #e84c24;
}

* { box-sizing: border-box; }

/** hidden 属性は要素固有の display 指定より常に優先する */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.65;
}

header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(20px, calc((100vw - 1100px) / 2));
  border-bottom: 2px solid var(--ink);
}

.brand { color: inherit; font-size: 18px; font-weight: 700; text-decoration: none; }
.container { width: min(900px, calc(100% - 32px)); margin: 44px auto; }
.card { margin: 20px 0; padding: clamp(20px, 4vw, 36px); border: 2px solid var(--ink); }
.eyebrow, .muted { color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; letter-spacing: .13em; }
h1, h2, h3 { margin: 0 0 18px; line-height: 1.3; }
p { margin: 0 0 14px; }

label { display: block; margin: 18px 0 10px; font-weight: 700; }
input, textarea, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea { resize: vertical; }
button, .button {
  display: inline-block;
  padding: 9px 15px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: 700 14px inherit;
  text-decoration: none;
}
button:hover, .button:hover { background: #fff; color: var(--ink); }
button:disabled { cursor: wait; opacity: .45; }
.secondary { margin-left: 8px; background: #fff; color: var(--ink); }
.link { padding: 2px; border: 0; border-bottom: 1px solid var(--ink); background: none; color: var(--ink); font-weight: 400; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.order-list { display: grid; gap: 10px; }
.order { width: 100%; padding: 15px; border: 2px solid var(--ink); background: #fff; color: var(--ink); text-align: left; }
.order .status { float: right; font-size: 12px; }
.message { min-height: 1.5em; color: var(--accent); font-weight: 700; }
.message.ok { color: #167046; }
.drop { margin: 8px 0; padding: 18px; border: 2px dashed var(--ink); background: #fff; text-align: center; }
.drop.drag { background: #f1f2f4; }
.drop input { display: none; }
.upload-guide { color: var(--muted); }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hair); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.thumb { padding: 6px; border: 2px solid var(--ink); }
.thumb img { display: block; width: 100%; height: 100px; object-fit: cover; }
.thumb small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-warning small { color: var(--accent); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.danger { border-color: var(--accent); color: var(--accent); }
.status-draft { color: #777; }
.status-submitted { color: #b34b13; }
.status-in_progress { color: #1766a3; }
.status-done { color: #167046; }

@media (max-width: 600px) {
  header { padding: 12px 16px; }
  .container { margin: 24px auto; }
  .page-head { align-items: start; flex-direction: column; }
  .secondary { margin: 8px 0 0; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
}
