/* 作業台の台帳：上に「次に作るなら」の表、下に1作品1行の台帳。状態は●と色札で（見本 2026-11-28 と同じ） */
:root {
  --bg: #f3f4f1; --panel: #ffffff; --fg: #1d2421; --muted: #5d6a64; --line: #dde2dd;
  --accent: #1f7a5c; --accent-soft: #e2f1ea;
  --ok: #1f7a5c; --test: #2c62b8; --none: #b9c1bc; --warn: #a16207; --fix: #c2410c; --fix-soft: #fdebdf;
  --seq: #b4235a; --seq-soft: #fbe4ec; --add: #2c62b8; --add-soft: #e3ecfa;
  --display: "Dela Gothic One", "Hiragino Kaku Gothic StdN", "Yu Gothic", sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root {
  --bg: #141917; --panel: #1c2320; --fg: #e6ebe8; --muted: #9aa8a1; --line: #2c3631;
  --accent: #4cc497; --accent-soft: #1d3a2f; --ok: #4cc497; --test: #7aa7f0; --none: #4a5650; --warn: #e0b04a; --fix: #fb8a52; --fix-soft: #3a2418;
  --seq: #f07aa5; --seq-soft: #3a1c28; --add: #7aa7f0; --add-soft: #1c2a40; color-scheme: dark } }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.6; }
.wrap { max-width: 860px; margin: 0 auto; padding-block: max(16px, env(safe-area-inset-top, 0px)) 48px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 16px; }
main { display: grid; gap: 16px; }
header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
h1 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; }
.upd { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.upd.old { color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.upd.old .dot { background: var(--warn); }
h2 { font-size: 15px; margin: 0 0 8px; font-weight: 700; }
.gate, .rec { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.gate { display: grid; gap: 10px; }
.gate p { margin: 0; }
.uid { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.how { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.p-seq { background: var(--seq-soft); color: var(--seq); } .p-add { background: var(--add-soft); color: var(--add); }
.up { color: var(--ok); }
.rtable { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rhead, .rrow { display: grid; grid-template-columns: 20px minmax(0, 1fr) 44px 54px 54px; gap: 4px; align-items: center; padding: 9px 10px; }
.rhead { font-size: 11px; color: var(--muted); padding-block: 6px; border-bottom: 1px solid var(--line); }
.rhead span:nth-child(3), .rrow > span:nth-child(3) { text-align: center; }
.rhead span:nth-child(n+4), .rrow > span:nth-child(n+4) { text-align: right; }
button.rrow, button.row { width: 100%; font: inherit; color: inherit; background: none; border: 0; border-top: 1px solid var(--line); cursor: pointer; text-align: left; }
.rhead + .rrow, .head + .row { border-top: 0; }
.rrow:focus-visible, .row:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rk { font-family: var(--display); color: var(--muted); }
.rn { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.v { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.rdet { background: var(--bg); border-top: 1px dashed var(--line); padding: 10px 12px; font-size: 13px; display: grid; gap: 4px; }
.listsec { display: grid; gap: 10px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filters button { font: inherit; font-size: 13px; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.filters button b { font-family: var(--mono); font-weight: 500; margin-left: 4px; }
.filters button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
#q { font: inherit; font-size: 14px; width: 100%; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.table { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.row, .head { display: grid; grid-template-columns: minmax(0, 1fr) 40px 36px 52px 44px; align-items: center; gap: 4px; padding: 9px 12px; }
.head { font-size: 11px; color: var(--muted); border-bottom: 1px solid var(--line); padding-block: 6px; }
.head span:not(:first-child), .row > span:not(:first-child) { text-align: center; }
.row.fix { box-shadow: inset 3px 0 0 var(--fix); }
.n { font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; min-width: 0; }
.n small { display: block; font-weight: 400; font-size: 11px; color: var(--fix); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c { font-size: 15px; } .c-on { color: var(--ok); } .c-off { color: var(--none); }
.play { font-size: 11px; font-weight: 700; } .pl-prod { color: var(--ok); } .pl-test { color: var(--test); } .pl-none { color: var(--none); font-weight: 400; }
.ago { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.det { border-top: 1px dashed var(--line); padding: 12px; display: grid; gap: 12px; background: var(--bg); }
.det h3 { font-size: 12px; color: var(--muted); margin: 0 0 4px; font-weight: 500; }
.hist { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 2px; }
.hist time { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-right: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
select, textarea, input { font: inherit; font-size: 14px; color: var(--fg); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; min-width: 0; }
textarea { width: 100%; min-height: 56px; resize: vertical; }
.counts { font-family: var(--mono); font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.prow, .xrow { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 8px; }
.prow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.xrow { grid-template-columns: repeat(3, minmax(0, 1fr)) auto; align-items: end; }
.prow input, .xrow input.url, .xrow .xd { grid-column: 1 / -1; }
.xrow label { font-size: 11px; color: var(--muted); display: grid; gap: 2px; min-width: 0; }
.xrow label input { width: 100%; }
.xsum, .msg { font-size: 12px; color: var(--muted); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.save { font: inherit; font-weight: 700; font-size: 14px; color: var(--panel); background: var(--accent); border: 0; border-radius: 8px; padding: 7px 18px; cursor: pointer; }
.save:disabled { opacity: .5; cursor: default; }
.ghost { font: inherit; font-size: 13px; color: var(--accent); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; cursor: pointer; justify-self: start; }
.ghost.del { color: var(--muted); }
.empty { color: var(--muted); text-align: center; margin: 12px 0; }
.foot { font-size: 11px; color: var(--muted); margin: 0; }
