:root {
  color-scheme: dark;
  --bg: #0d0d0f; --panel: #1c1c22; --panel2: #26262e; --line: #3a3a44;
  --text: #ececf1; --muted: #b9b9c4; --blue: #2f7bf6; --green: #3ec27a; --red: #f06262; --amber: #e8b04a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; }
header h1 { font-size: 18px; margin: 0; }
nav { display: flex; gap: 8px; }
button, .btn { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: #444; }
button.primary, .btn.primary { background: var(--blue); border-color: var(--blue); font-weight: 600; }
button.green { background: var(--green); border-color: var(--green); color: #06210f; font-weight: 600; }
button:disabled { opacity: .6; cursor: default; }
button.primary:disabled { background: #3a4a66; border-color: #3a4a66; color: #c9d3e6; opacity: 1; }
.need { color: var(--amber); font-size: 14px; font-weight: 600; }
.layout { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 57px); }
aside { border-right: 1px solid var(--line); padding: 12px; overflow-y: auto; }
aside .item { padding: 10px 12px; border-radius: 9px; cursor: pointer; margin-bottom: 4px; }
aside .item:hover { background: var(--panel); }
aside .item.on { background: var(--panel2); }
aside .item b { display: block; font-weight: 600; font-size: 14px; }
aside .item span { font-size: 12px; color: var(--muted); }
main { padding: 20px 24px 80px; max-width: 980px; width: 100%; }
h2 { font-size: 22px; margin: 0 0 4px; }
h3 { font-size: 16px; margin: 26px 0 10px; }
.muted { color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 14px 0; }
textarea, input[type=text], select { width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; }
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.steps { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--panel2); color: var(--muted); }
.steps span.on { background: var(--blue); color: #fff; }
.steps span.done { color: var(--green); }
.ideas { display: grid; gap: 6px; margin-top: 12px; }
.ideas button { text-align: left; background: var(--panel2); }
.ideas button b { font-weight: 600; }
.pics { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.pics figure { margin: 0; flex: 0 0 auto; }
.pics img { height: 220px; border-radius: 10px; display: block; }
.pics figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
ol.brief { margin: 6px 0 0; padding-left: 20px; }
.lines { display: grid; gap: 6px; }
.line { display: grid; grid-template-columns: 28px 64px 1fr 30px; gap: 6px; align-items: center; }
.line .n { color: var(--muted); font-size: 12px; text-align: right; }
.line .who { padding: 7px 0; font-size: 13px; }
.line .who.me { background: #1d3f7a; border-color: #2a5cb3; }
.line input { padding: 8px 10px; }
.line .x { padding: 6px 0; color: var(--muted); }
.line img { height: 110px; border-radius: 8px; }
.line .add { grid-column: 3; justify-self: start; font-size: 12px; padding: 2px 10px; color: var(--muted); background: transparent; border-style: dashed; opacity: 0; }
.line:hover .add, .line .add:focus { opacity: 1; }
.check { font-size: 14px; padding: 10px 12px; border-radius: 9px; background: var(--panel2); }
.check.ok { color: var(--green); } .check.bad { color: var(--red); }
.check li { color: var(--text); }
.check .warn { color: var(--amber); }
pre.log { background: #000; color: #aaa; font-size: 12px; padding: 10px; border-radius: 9px; max-height: 200px; overflow: auto; white-space: pre-wrap; }
video { width: 100%; max-width: 300px; border-radius: 12px; background: #000; display: block; }
.videos { display: flex; gap: 16px; flex-wrap: wrap; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid #fff4; border-top-color: #fff; border-radius: 50%; animation: s 0.8s linear infinite; vertical-align: -2px; margin-right: 6px; }
@keyframes s { to { transform: rotate(360deg); } }
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #2a2a31; padding: 10px 16px; border-radius: 9px; display: none; max-width: 90vw; z-index: 10; }
.empty { text-align: center; padding: 60px 0; color: var(--muted); }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); max-height: 180px; }
  main { padding: 16px 16px 80px; }
  .line { grid-template-columns: 22px 54px 1fr 26px; }
  .pics img { height: 160px; }
}
/* step boxes (2026-10-15) */
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 16px 0; }
.box > .head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.box > .head .num { width: 26px; height: 26px; border-radius: 50%; background: var(--panel2); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.box.on > .head .num { background: var(--blue); color: #fff; }
.box.done > .head .num { background: var(--green); color: #06210f; }
.box > .head b { font-size: 16px; }
.box.locked > .head b { color: var(--muted); }
.picgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.pic { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pic .tag { font-size: 12px; font-weight: 600; }
.pic .tag span { font-weight: 400; color: var(--muted); }
.pic .frame { position: relative; aspect-ratio: 9 / 16; border-radius: 8px; background: #000; display: grid; place-items: center; overflow: hidden; color: var(--muted); font-size: 13px; text-align: center; padding: 0; }
.pic .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.pic .frame.fail { color: var(--red); padding: 8px; }
.pic textarea { min-height: 64px; font-size: 13px; padding: 7px 8px; }
.pic .btns { display: flex; gap: 6px; }
.pic .btns button { flex: 1; padding: 6px 8px; font-size: 13px; }
.pic .editbox { display: grid; gap: 6px; }
.pic .editbox input { font-size: 13px; padding: 7px 8px; }
#zoom { position: fixed; inset: 0; background: #000d; display: none; place-items: center; z-index: 20; cursor: zoom-out; padding: 16px; }
#zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; }
/* opener picker */
.openers { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; }
.opener { flex: 0 0 auto; width: 92px; padding: 4px; display: flex; flex-direction: column; gap: 4px; align-items: stretch; background: var(--panel2); border: 2px solid var(--line); border-radius: 10px; cursor: pointer; margin: 0; color: var(--text); }
.opener img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; display: block; }
.opener span { font-size: 11px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opener.on { border-color: var(--blue); }
.opener.add { justify-content: center; text-align: center; border-style: dashed; }
.opener.add b { font-size: 26px; line-height: 1; aspect-ratio: 3 / 4; display: grid; place-items: center; }
/* picture / video choice and image-tool note */
.kinds { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kind { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: center; margin: 0; padding: 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel2); cursor: pointer; color: var(--text); font-size: 15px; }
.kind span { grid-column: 2; font-size: 13px; color: var(--muted); }
.kind:has(input:checked) { border-color: var(--blue); }
.tooltip-note { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.tooltip-note .muted { flex: 1; min-width: 220px; }
@media (max-width: 760px) { .kinds { grid-template-columns: 1fr; } }
.befores { display: flex; gap: 10px; }
.befores img { height: 220px; border-radius: 10px; cursor: zoom-in; }
/* version two: upload lists */
.uplist { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.up { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.up .frame { position: relative; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #000; }
.up .frame img, .up .frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.up .frame img { cursor: zoom-in; }
.upbar { display: flex; gap: 4px; align-items: center; }
.upbar span { flex: 1; font-size: 12px; font-weight: 600; }
.upbar button { padding: 3px 7px; font-size: 12px; }
.up.add { justify-content: center; align-items: center; text-align: center; border-style: dashed; cursor: pointer; min-height: 200px; margin: 0; color: var(--muted); font-size: 13px; }
.up.add b { font-size: 30px; color: var(--text); display: block; }
.up.pickable { cursor: pointer; padding: 6px; color: var(--text); font: inherit; }
.up.pickable.on { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue); }
.up.pickable .frame img { cursor: pointer; }
.up .badge { position: absolute; left: 6px; top: 6px; background: var(--blue); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 7px; border-radius: 99px; }
.pickhook { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
