:root {
  --bg: #f6f7f5; --card: #fff; --ink: #1d2320; --muted: #66706b; --line: #e2e6e3;
  --brand: #2f7d4f; --brand-ink: #fff; --danger: #b3261e; --warn: #9a6700;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.6; font-size: 15px; }
a { color: var(--brand); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 14px; }
.wrap { max-width: 960px; margin: 0 auto; padding: 24px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.card.older { opacity: .85; }
.narrow { max-width: 520px; margin: 48px auto; }
.center { text-align: center; }
.empty { padding: 48px 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.inline { display: inline; }
.btn { display: inline-block; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #c5ccc8; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); border-color: #e8c3c0; background: transparent; }
.btn-lg { padding: 11px 22px; font-size: 16px; }
.btn[disabled] { opacity: .6; cursor: wait; }
.alert { background: #fdecea; color: var(--danger); border-radius: 8px; padding: 10px 14px; }
.list { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list th, .list td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.list th { font-size: 13px; color: var(--muted); font-weight: 600; background: #fafbfa; }
.list tr:last-child td { border-bottom: 0; }
.badge { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eef0ee; white-space: nowrap; }
.badge-done { background: #e3f3e8; color: var(--brand); }
.badge-running, .badge-queued { background: #fff4d6; color: var(--warn); }
.badge-failed { background: #fdecea; color: var(--danger); }
.form .field { display: block; margin-bottom: 16px; }
.form .field > span { display: block; font-weight: 600; margin-bottom: 4px; }
.form em { font-style: normal; font-size: 12px; color: var(--danger); margin-left: 4px; }
input[type=text], input[type=url], input[type=email], input[type=number], select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
input[type=file] { font: inherit; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check { display: block; margin-bottom: 16px; }
.actions { margin-top: 8px; }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }
.progress { position: relative; height: 22px; background: #eef0ee; border-radius: 999px; overflow: hidden; margin: 12px 0; }
.progress .bar { height: 100%; width: 0; background: var(--brand); transition: width .4s; }
.progress .pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.stages { padding-left: 20px; color: var(--muted); }
.stages li.done { color: var(--brand); }
.stages li.done::marker { content: "✓ "; }
.stages li.current { color: var(--ink); font-weight: 700; }
.log pre, pre.error { background: #f3f4f3; padding: 10px; border-radius: 8px; font-size: 12px; max-height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.files { list-style: none; padding: 0; margin: 0 0 12px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.files li:last-child { border-bottom: 0; }
.ftype { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: #eef0ee; color: var(--muted); min-width: 40px; text-align: center; }
.preview { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 8px; }
.danger-zone { margin-top: 32px; text-align: right; }
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .top { flex-wrap: wrap; padding: 10px 14px; }
  .wrap { padding: 14px; }
  .who { display: none; }
  .list th:nth-child(3), .list td:nth-child(3) { display: none; }
  .preview { height: 420px; }
}

.invite { width: 100%; font: inherit; padding: .6rem; border-radius: 8px; border: 1px solid #d0d5dd; background: #f8fafc; }
tr.revoked td { opacity: .6; }
.row input[type=number] { width: 6.5rem; flex: none; }
.row select { width: auto; }
.list th, .list .btn, .list .badge { white-space: nowrap; }
.list td:first-child { overflow-wrap: anywhere; }
.list td:nth-child(2) { white-space: nowrap; }
