/* 白と温グレー（stone）の静かな業務画面。アクセントは深緑 1 色（表の画像と同じ #24543f） */
:root {
  --bg: #fafaf9; --card: #fff; --line: #e7e5e4; --text: #292524; --muted: #78716c;
  --accent: #24543f; --accent-ink: #fff; --accent-soft: #eef4f0;
  --ok: #15803d; --warn: #b45309; --ng: #b91c1c; --info: #1d4ed8;
  --r: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.8 "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-feature-settings: "palt";
}
a { color: var(--accent); }
h1, h2 { line-height: 1.4; letter-spacing: .03em; margin: 0 0 16px; }
h1 { font-size: 25px; }
h2 { font-size: 20px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 8px 16px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.who { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: 14px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.card { background: var(--card); border-radius: var(--r); padding: 24px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(41, 37, 36, .08); }
.card.narrow { max-width: 440px; margin: 48px auto; }

.status { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 16px 24px; background: var(--card); border-radius: var(--r); box-shadow: 0 1px 3px rgba(41, 37, 36, .08); }
.stat .k { color: var(--muted); font-size: 14px; }
.stat .v { font-size: 20px; font-weight: 700; }
.ok { color: var(--ok); font-size: 14px; }
.ng { color: var(--ng); font-size: 14px; font-weight: 700; }

.notice { padding: 16px 24px; border-radius: var(--r); background: #fffbeb; color: #78350f; margin: 0 0 24px; }
.alert { padding: 16px; border-radius: var(--r); background: #fef2f2; color: var(--ng); margin: 0 0 16px; white-space: pre-wrap; }
.hints { margin: 0 0 24px; padding-left: 24px; color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 8px; }
.form label { font-weight: 700; font-size: 14px; margin-top: 8px; }
input[type=text], input:not([type]), input[type=password] {
  font: inherit; padding: 8px 16px; min-height: 48px; border: 1px solid #d6d3d1; border-radius: var(--r); background: #fff;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid #86b49c; outline-offset: 2px; }
.upload { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.upload input[type=file] { font: inherit; max-width: 100%; }

button {
  font: inherit; min-height: 48px; padding: 8px 24px; border-radius: var(--r); cursor: pointer;
  border: 1px solid #d6d3d1; background: #fff; color: var(--text);
}
button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.form button.primary { margin-top: 16px; }
button.link { min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); text-decoration: underline; font-size: 14px; }

.list { width: 100%; border-collapse: collapse; }
.list th, .list td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list th { font-size: 14px; color: var(--muted); font-weight: 700; }
.list td.num { white-space: nowrap; }
.list tbody tr:hover { background: #fafaf9; }

.st { display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.st-queued { color: var(--muted); background: #f5f5f4; }
.st-running { color: var(--info); background: #eff6ff; }
.st-done { color: var(--ok); background: #f0fdf4; }
.st-drafted { color: var(--warn); background: #fffbeb; }
.st-failed { color: var(--ng); background: #fef2f2; }
.st-canceled { color: var(--muted); background: #f5f5f4; }

.title { font-size: 20px; }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 16px; }
.meta dt { color: var(--muted); font-size: 14px; }
.meta dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; gap: 16px; }
.actions form { margin: 0; }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.files figure { margin: 0; }
.files img { width: 100%; height: 160px; object-fit: cover; object-position: top; border-radius: 4px; border: 1px solid var(--line); }
.files figcaption { font-size: 14px; color: var(--muted); }
.log { margin: 0; padding: 16px; background: #f5f5f4; border-radius: 4px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }

.qr { display: flex; justify-content: center; margin: 16px 0; }
.qr svg { width: 200px; height: 200px; }
.steps { padding-left: 24px; }
.secret code { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .list thead { display: none; }
  .list tr { display: grid; grid-template-columns: 1fr auto; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .list td { border: 0; padding: 2px 8px; }
  .list td:nth-child(2) { grid-column: 1 / -1; order: -1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
