/* The 大厅 (lobby doors) and the 设计室 (studio.js) - owner 2026-11-04: pictures and icons first, big targets, the state on
 * the thing itself, an answer to every click. Colours come from style.css / workspace.css; the 设计室's own is violet. */
:root { --studio: #8a3ab9; --studio-soft: #f3e8fb; --tile: 168px; }
@media (prefers-color-scheme: dark) { :root { --studio: #d7a6f5; --studio-soft: #33213f; } }

/* the room tabs carry their icon */
.ws-tab { grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.ws-tab i { grid-row: span 2; display: grid; place-items: center; font-style: normal; opacity: .85; }
.ws-tab.on.studio { background: var(--studio-soft); color: var(--studio); }
.ws-rail.studio a.on { background: var(--studio-soft); color: var(--studio); font-weight: 600; }
@media (max-width: 1320px) { .ws-tab span { display: none; } .ws-tab { padding: 6px 11px; } .ws-tab i { grid-row: auto; } }
@media (max-width: 640px) { .ws-tab { grid-template-columns: 1fr; justify-items: center; } .ws-tab i { grid-row: auto; } }

/* ---------------------------------------------------------------------------------------------- 大厅 (the page itself: lobby.css, 2026-11-24) */
.lb-td-room { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.lb-td-room.wh { background: var(--wh-soft); color: var(--wh); }
.lb-td-room.shop { background: var(--shop-soft); color: var(--shop); }
.lb-td-room.studio { background: var(--studio-soft); color: var(--studio); }
.lb-td-room.office { background: var(--office-soft); color: var(--office); }
.lb-td-room.adm { background: var(--adm-soft); color: var(--adm); }
/* 用谁的眼睛看 (the owner): chips; while looking a calm blue frame says whose eyes these are */
.lb-look { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0 0; min-height: 34px; }
.lb-look-k { font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-right: 2px; }
.lb-look-c { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.lb-look-c[data-look=""] { padding-left: 12px; }
.lb-look-c small { color: var(--text-3); font-size: 11.5px; }
.lb-look-c:hover { border-color: var(--accent); }
.lb-look-c.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.lb-look-c.on small { color: rgb(255 255 255 / .8); }
.lb-look-av { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.lb-look-c.on .lb-look-av { background: rgb(255 255 255 / .25); color: #fff; }
.lb-look-more { width: auto; flex: none; max-width: 220px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.lb-look-say { flex-basis: 100%; margin: 4px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text); font-size: 13.5px; }
body.lb-looking #page-today { box-shadow: inset 0 0 0 3px var(--accent-soft); border-radius: 18px; }
/* 审批历史 */
.lb-appr .panel-head { flex-wrap: wrap; gap: 8px; }
.ap-scopes { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface-2); }
.ap-scope { border: 0; background: none; padding: 4px 12px; border-radius: 999px; font: inherit; font-size: 13px; color: var(--text-2); cursor: pointer; }
.ap-scope.on { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgb(20 24 34 / .12); }
.ap-kinds { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 var(--gutter) 8px; }
.ap-kind { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.ap-kind.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.ap-kind i { font-style: normal; color: var(--text-3); }
.ap-list { list-style: none; margin: 0; padding: 0 var(--gutter) 10px; }
.ap-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.ap-list li:first-child .ap-row { border-top: 0; }
.ap-row:hover b { color: var(--accent); }
.ap-mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--surface-2); color: var(--text-3); }
.ap-row.ok .ap-mark { background: var(--ok-soft, var(--surface-2)); color: var(--ok); }
.ap-row.amber .ap-mark { background: var(--warn-soft); color: var(--warn); }
.ap-row.bad .ap-mark { background: var(--bad-soft); color: var(--bad); }
.ap-row.up .ap-mark { background: var(--accent-soft); color: var(--accent); }
.ap-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ap-body b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-body small { color: var(--text-3); font-size: 12.5px; }
.ap-body em { font-style: normal; color: var(--text-2); font-weight: 600; }
.ap-row.bad .ap-body em { color: var(--bad); }
.ap-row.amber .ap-body em { color: var(--warn); }
.ap-kindname { display: inline-flex; align-items: center; gap: 3px; }
.ap-body q { color: var(--text-2); font-size: 13px; quotes: "「" "」"; }
.ap-none { padding: 14px 0; color: var(--text-3); font-size: 13.5px; }
/* 系统现在 (the owner) - also the 系统状态 page, wider */
.sys-now { max-width: 720px; padding: 18px 22px 12px; }
.sys-now .lb-sys-list li { font-size: 14px; padding: 10px 0; }
.lb-sys { padding: 14px 16px 10px; margin-bottom: 14px; }
.lb-sys-h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.lb-sys-h h2 { margin: 0; font-size: 15px; }
.lb-sys-h p { margin: 2px 0 0; font-size: 13px; color: var(--text-2); }
.lb-sys-light { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 5px var(--ok-soft, var(--surface-2)); }
.lb-sys-light.amber { background: var(--warn); box-shadow: 0 0 0 5px var(--warn-soft); }
.lb-sys-light.red { background: var(--bad); box-shadow: 0 0 0 5px var(--bad-soft); }
.lb-sys-list { list-style: none; margin: 0; padding: 0; }
.lb-sys-list li > a { display: contents; }
.lb-sys-list li { display: grid; grid-template-columns: 10px auto 1fr; align-items: baseline; gap: 4px 10px; padding: 7px 0; border-top: 1px solid var(--border); font-size: 13px; }
.lb-sys-list li:first-child { border-top: 0; }
.lb-sys-list a { color: inherit; text-decoration: none; }
.lb-sys-list li:has(a):hover .lb-sys-k { color: var(--accent); }
.lb-sys-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); align-self: center; }
.lb-sys-dot.amber { background: var(--warn); }
.lb-sys-dot.red { background: var(--bad); }
.lb-sys-k { color: var(--text-3); white-space: nowrap; }
.lb-sys-v { text-align: right; overflow-wrap: anywhere; }
.lb-sys-list li.red .lb-sys-v { color: var(--bad); font-weight: 600; }
.lb-sys-list li.amber .lb-sys-v { color: var(--warn); font-weight: 600; }
@media (max-width: 640px) {  /* a phone: the tabs' names on one line */
  .ws-tab b { white-space: nowrap; font-size: 14px; }
}

/* ---------------------------------------------------------------------------------------------- 设计室 */
.st-page { padding-bottom: 90px; }
.st-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 16px; margin-bottom: 14px; }
.st-head-ic { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--studio-soft); color: var(--studio); }
.st-head-t { flex: 1; min-width: 240px; }
.st-head-t h1 { margin: 0 0 2px; font-size: 24px; }
.st-head-t p { margin: 0; color: var(--text-2); max-width: 72ch; }
.st-head-act { display: flex; gap: 8px; }
.st-ic { flex: none; vertical-align: -0.2em; }
.btn .st-ic { margin-right: 2px; }
.st-page a.btn, .st-dlg a.btn { text-decoration: none; }

/* my computers */
.st-pc { padding: 16px; display: grid; gap: 12px; }
.st-pc-empty { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.st-pc-empty > div:nth-child(2) { flex: 1; min-width: 260px; }
.st-pc-empty p { margin: 4px 0 10px; color: var(--text-2); }
.st-pc-big { width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; background: var(--studio-soft); color: var(--studio); }
.st-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.st-steps li { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; counter-increment: s; }
.st-steps li::before { content: counter(s); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--studio); color: #fff; font-size: 11px; font-weight: 700; }
.st-pc-list { display: grid; gap: 8px; }
.st-pc-row { display: flex; align-items: center; gap: 12px; }
.st-pc-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.st-pc-ic.on { background: var(--ok-soft); color: var(--ok); }
.st-pc-t { flex: 1; min-width: 0; display: grid; gap: 1px; }
.st-pc-t > span { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-pc-t em { font-style: normal; font-size: 12px; color: var(--text-3); font-weight: 500; margin-left: 4px; }
.st-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); margin-left: 4px; vertical-align: 1px; }
.st-dot.on { background: #2fb36b; box-shadow: 0 0 0 3px rgb(47 179 107 / .2); }
.st-pc-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-pc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 12.5px; }
.st-space { width: 160px; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.st-space span { display: block; height: 100%; background: var(--studio); }

/* the way a file goes: steps you can click to see what is at that step */
.st-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0; }
.st-step { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 12px;
  border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.st-step b { font-size: 18px; line-height: 1; }
.st-step > span:last-child { grid-column: 2; font-size: 12px; color: var(--text-3); }
.st-step-ic { grid-row: span 2; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.st-step:hover { border-color: var(--studio); }
.st-step.on { border-color: var(--studio); background: var(--studio-soft); box-shadow: 0 0 0 1px var(--studio) inset; }
.st-step.on .st-step-ic { background: var(--studio); color: #fff; }
.st-step.new.on .st-step-ic, .st-step.new .st-step-ic { color: var(--studio); }
.st-step.new.on .st-step-ic { color: #fff; }
.st-step.approved .st-step-ic { color: #c78a00; }
.st-step.blocked .st-step-ic, .st-step.blocked b { color: var(--bad); }
.st-step.returned .st-step-ic { color: var(--warn); }
.st-step.src { cursor: default; grid-template-columns: auto; grid-template-rows: auto; display: flex; gap: 6px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.st-arrow { color: var(--border-strong); display: grid; }
.st-flow-side { display: flex; gap: 6px; margin-left: auto; }
@media (max-width: 900px) { .st-arrow { display: none; } .st-flow-side { margin-left: 0; } }

.st-lead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--studio-soft); color: var(--text); font-size: 13.5px; }
.st-lead > .st-ic { color: var(--studio); }
.st-lead > span { flex: 1; min-width: 220px; }
.st-lead.bad { background: var(--bad-soft); } .st-lead.bad > .st-ic { color: var(--bad); }
.st-empty { display: grid; justify-items: center; gap: 10px; padding: 48px 16px; color: var(--text-3); text-align: center; }
.st-empty .st-ic { color: var(--border-strong); }

/* tiles: the picture first */
.st-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 14px; }
.st-tile { position: relative; display: grid; grid-template-rows: auto auto; border-radius: 14px; background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; user-select: none; }
.st-tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.st-tile.sel { border-color: var(--studio); box-shadow: 0 0 0 2px var(--studio); }
.st-thumb { aspect-ratio: 1; display: grid; place-items: center; background:
  repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; overflow: hidden; }
.st-thumb img { width: 100%; height: 100%; object-fit: contain; }
.st-badge { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: 6px; font: 800 12px/1 var(--font-sans); letter-spacing: .02em; }
.st-thumb .st-badge, .st-badge.big { min-width: 64px; height: 64px; border-radius: 16px; font-size: 22px; box-shadow: 0 4px 14px rgb(0 0 0 / .18); }
.st-wait { display: grid; justify-items: center; gap: 6px; color: var(--text-3); font-size: 12px; }
.st-wait em { font-style: normal; }
.st-wait.bad { color: var(--bad); }
.st-wait .st-ic { animation: st-breathe 1.6s ease-in-out infinite; }
.st-wait.bad .st-ic { animation: none; }
@keyframes st-breathe { 50% { opacity: .35; } }
.st-cap { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; min-width: 0; }
.st-cap > div { display: grid; min-width: 0; }
.st-cap b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cap span { font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cap span .st-ic { vertical-align: -2px; }
.st-cap time { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
/* the day the tiles below it are from */
.st-day { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; font-size: 15px; font-weight: 700; color: var(--text); }
.st-day:first-child, .st-lead + .st-day { margin-top: 0; }
.st-day > .st-ic { color: var(--studio); }
.st-day b { font-size: 12px; font-weight: 600; color: var(--text-3); }
.st-lead.st-same .st-link { margin: 0 2px; }
.st-pick { position: absolute; top: 8px; left: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 2px solid #fff; background: rgb(20 24 34 / .28); color: transparent; cursor: pointer; box-shadow: 0 1px 4px rgb(0 0 0 / .3);
  opacity: .9; transition: background .12s, color .12s, transform .12s; }
.st-pick:hover { background: rgb(20 24 34 / .45); color: rgb(255 255 255 / .8); }
.st-tile.sel .st-pick { background: var(--studio); color: #fff; transform: scale(1.08); }
.st-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.st-tile > .st-chip { position: absolute; top: 10px; right: 8px; background: rgb(255 255 255 / .92); color: #333; box-shadow: 0 1px 4px rgb(0 0 0 / .15); }
.st-chip.clock { color: #6b4b00; }
.st-chip.warn { background: var(--warn-soft); color: var(--warn); }
.st-tile > .st-chip.warn { background: #fff3d6; color: #7a4a00; }
.st-chip.bad, .st-tile > .st-chip.bad { background: var(--bad-soft); color: var(--bad); }
.st-chip.stage.approved { background: #fff1c2; color: #7a5600; }
.st-chip.stage.new, .st-chip.stage.shared, .st-chip.stage.review { background: var(--studio-soft); color: var(--studio); }
.st-av { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff;
  background: hsl(var(--h) 55% 48%); }

/* the bar while files are chosen */
.st-bar { position: fixed; left: 50%; bottom: 18px; z-index: 40; transform: translateX(-50%); display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  max-width: calc(100vw - 24px); padding: 10px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg); animation: st-up .2s cubic-bezier(.2, .8, .2, 1); }
.st-bar > b { margin-right: 6px; }
@keyframes st-up { from { transform: translate(-50%, 20px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .st-bar { animation: none; } .st-tile, .st-tile:hover { transform: none; } }

/* drop files here */
.st-drop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgb(138 58 185 / .18); backdrop-filter: blur(2px); }
.st-drop > div { display: grid; justify-items: center; gap: 8px; padding: 36px 48px; border: 3px dashed var(--studio); border-radius: 24px; background: var(--surface); color: var(--studio); }
.st-drop span { color: var(--text-2); font-size: 13px; }
.st-ups { padding: 10px 14px; margin-bottom: 12px; display: grid; gap: 6px; }
.st-up { display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 340px) minmax(28px, auto); gap: 10px; align-items: center; font-size: 13px; }
.st-ups-note { margin: 2px 0 0; font-size: 12px; }
.st-ups-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.st-up-x { width: 28px; height: 28px; border-radius: 50%; border: 0; display: grid; place-items: center; padding: 0; background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.st-up-x:hover { background: var(--bad-soft); color: var(--bad); }
.st-up .st-link { white-space: nowrap; font-size: 12.5px; }
@media (max-width: 640px) { .st-up { grid-template-columns: minmax(0, 1fr) 80px minmax(28px, auto); } .st-up em { grid-column: 1 / -1; grid-row: 2; } }
.st-up > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-up i { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.st-up s { display: block; height: 100%; background: var(--studio); transition: width .2s; }
.st-up em { font-style: normal; color: var(--text-3); }
.st-up.ok em { color: var(--ok); } .st-up.bad em { color: var(--bad); } .st-up.skip em { color: var(--text-3); }

/* chips (filters) */
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.st-chipbtn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.st-chipbtn b { font-size: 12px; color: var(--text-3); }
.st-chipbtn .st-badge { min-width: 22px; height: 18px; font-size: 9.5px; border-radius: 5px; padding: 0 4px; }
.st-chipbtn:hover { border-color: var(--studio); }
.st-chipbtn.on { background: var(--studio-soft); color: var(--studio); border-color: var(--studio); font-weight: 600; }

/* 等我审核 */
.st-review { display: grid; gap: 14px; }
.st-rv { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 14px; }
.st-rv-pic { aspect-ratio: 1; border-radius: 12px; overflow: hidden; display: grid; place-items: center; padding: 0; border: 1px solid var(--border); cursor: zoom-in;
  background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; }
.st-rv-pic img { width: 100%; height: 100%; object-fit: contain; }
.st-rv-t h2 { margin: 6px 0 2px; font-size: 18px; }
@media (max-width: 640px) { .st-rv { grid-template-columns: 1fr; } }
/* choosing several works of a series (老板 2026-11-12): the circle on the picture, the group's 选这一组 */
.st-rv { position: relative; transition: border-color .15s, box-shadow .15s; }
.st-rv > .st-pick { top: 22px; left: 22px; }
.st-rv.sel { border-color: var(--studio); box-shadow: 0 0 0 2px var(--studio); }
.st-rv.sel > .st-pick { background: var(--studio); color: #fff; transform: scale(1.08); }
.st-rv-group { display: grid; gap: 14px; }
.st-rv-group + .st-rv-group { margin-top: 10px; }
.st-rv-group > .st-day { margin: 0; flex-wrap: wrap; }
.st-rv-group > .st-day .btn { margin-left: auto; }
.st-note time { margin-left: 4px; font-size: 12px; color: var(--text-3); white-space: nowrap; }

/* 给你的留言 on 我的素材 */
.st-lead.st-said { background: var(--warn-soft); }
.st-lead.st-said > .st-ic { color: var(--warn); }
.st-said-row { display: block; margin-top: 4px; }
.st-said-row time { margin-left: 6px; font-size: 12px; color: var(--text-3); }

/* 按电脑上的文件夹放 (米倩 2026-11-16) */
.st-bypath { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border-radius: 12px; border: 1px solid var(--studio);
  background: var(--studio-soft); cursor: pointer; }
.st-bypath input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--studio); flex: none; }
.st-bypath > span { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: center; }
.st-bypath .st-ic { color: var(--studio); }
.st-bypath em { grid-column: 1 / -1; font-style: normal; font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.st-ups-more { margin: 2px 0 0; font-size: 12.5px; }

/* 素材库 */
.st-lib { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; align-items: start; }
/* minmax(0, 1fr): a long product name is cut with … instead of widening the column (2026-11-07) */
.st-tree { position: sticky; top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px; max-height: calc(100vh - 120px); overflow: hidden auto; }
.st-tree-it { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px 7px calc(8px + var(--d, 0) * 16px); border: 0; border-radius: 9px; background: none;
  color: var(--text); font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
/* dragging pictures onto a folder (归类) */
.st-dragging #page-studio-lib .st-tree-it[data-f]:not([data-f=""]), .st-dragging #page-studio-lib .st-fcard { outline: 2px dashed rgb(138 58 185 / .35); outline-offset: -2px; }
.st-tree-it.st-drop-on, .st-fcard.st-drop-on { background: var(--studio-soft); color: var(--studio); outline: 2px solid var(--studio) !important; transform: scale(1.02); }
#page-studio-lib .st-tile[draggable="true"] { cursor: grab; }
#page-studio-lib .st-tile[draggable="true"]:active { cursor: grabbing; }
.st-tree-it:hover { background: var(--surface-2); }
.st-tree-it.on { background: var(--studio-soft); color: var(--studio); font-weight: 600; }
.st-tree-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tree-n > span, .st-tree-n > small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tree-n > small { font-size: 11px; line-height: 1.3; color: var(--text-3); font-family: var(--font-mono); font-weight: 400; }
.st-tree-it.on .st-tree-n > small { color: var(--studio); }
.st-tree-it b { font-size: 12px; color: var(--text-3); font-weight: 600; }
.st-tree-act { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.st-fic { flex: none; width: 26px; height: 26px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--studio); overflow: hidden; }
.st-fic-img { width: 100%; height: 100%; object-fit: cover; }
.st-lib-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 10px; }
.st-lib-head h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 20px; margin-right: auto; }
.st-search { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); }
.st-search input { border: 0; outline: 0; background: none; color: var(--text); font: inherit; width: 180px; }
.st-search:focus-within { border-color: var(--studio); }
.st-folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.st-fcard { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 0; padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit;
  text-align: left; overflow: hidden; cursor: pointer; transition: border-color .15s, transform .15s; }
.st-fcard:hover { border-color: var(--studio); transform: translateY(-2px); }
.st-fcard-pic { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--studio-soft); color: var(--studio); overflow: hidden; }
.st-fcard-pic img { width: 100%; height: 100%; object-fit: cover; }
.st-fcard-t { display: flex; align-items: center; gap: 6px; padding: 9px 10px 2px; }
.st-fcard-t b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fcard-t em { font-style: normal; font-size: 12px; color: var(--text-3); }
.st-fcard-sku { padding: 0 10px 9px; font-size: 11.5px; color: var(--text-3); font-family: var(--font-mono); }
.st-fcard > :last-child { padding-bottom: 10px; }
@media (max-width: 860px) { .st-lib { grid-template-columns: 1fr; } .st-tree { position: static; max-height: none; } }

/* dialogs */
.st-dlg { border: 0; border-radius: 18px; padding: 0; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); max-width: calc(100vw - 24px); }
.st-dlg::backdrop { background: var(--scrim); }
.st-pad { padding: 20px; }
.st-ask { width: min(520px, calc(100vw - 24px)); }
.st-ask form { display: grid; gap: 12px; padding: 20px; }
.st-ask h2 { margin: 0; font-size: 18px; }
.st-field { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); }
.st-field input, .st-field textarea, .st-field select { box-sizing: border-box; width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.st-dlg-row { display: flex; justify-content: flex-end; gap: 8px; }
.st-icpicks { display: flex; flex-wrap: wrap; gap: 6px; }
.st-ask { overflow-x: hidden; }
.st-icpick { position: relative; }
.st-icpick input, .st-fpick input[type=radio]:not(:focus-visible), .st-prod input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.st-icpick span { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--text-2); cursor: pointer; }
.st-icpick input:checked + span { background: var(--studio-soft); color: var(--studio); border-color: var(--studio); box-shadow: 0 0 0 1px var(--studio) inset; }
.st-icpick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-fpicks { display: grid; gap: 4px; max-height: 320px; overflow: auto; padding: 4px; border: 1px solid var(--border); border-radius: 12px; }
.st-fpick { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px calc(8px + var(--d, 0) * 18px); border-radius: 9px; cursor: pointer; font-size: 14px; }
.st-fpick:hover { background: var(--surface-2); }
.st-fpick:has(input:checked) { background: var(--studio-soft); color: var(--studio); font-weight: 600; }
.st-prods { display: grid; gap: 6px; max-height: 240px; overflow: auto; }
.st-prod { position: relative; display: grid; grid-template-columns: 40px auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; }
.st-prod:has(input:checked) { border-color: var(--studio); background: var(--studio-soft); box-shadow: 0 0 0 1px var(--studio); }
.st-prod-has { font-style: normal; font-size: 11.5px; color: var(--studio); background: var(--studio-soft); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.st-pick-hint { margin: 2px 4px; font-size: 12.5px; }
.st-prod img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.st-prod span { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-guide { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.st-guide li { display: flex; gap: 12px; align-items: flex-start; }
.st-guide li > .st-ic { flex: none; padding: 8px; box-sizing: content-box; border-radius: 12px; background: var(--studio-soft); color: var(--studio); }
.st-guide div { display: grid; gap: 2px; } .st-guide span { color: var(--text-2); font-size: 13px; }
.st-cmd { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #1d1f24; }
.st-cmd code { flex: 1; min-width: 0; color: #e8eaf0; font: 12px/1.45 var(--font-mono); overflow-wrap: anywhere; user-select: all; }

.st-detail { width: min(1080px, calc(100vw - 24px)); }
.st-dt { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); max-height: calc(100vh - 48px); }
.st-dt-pic { display: grid; place-items: center; min-height: 360px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 20px 20px; }
.st-dt-pic img, .st-dt-pic video { display: block; max-width: 100%; max-height: calc(100vh - 48px); object-fit: contain; }
.st-dt-pic a { display: grid; place-items: center; width: 100%; height: 100%; cursor: zoom-in; }
.st-dt-info { padding: 18px 20px; overflow: auto; display: grid; gap: 10px; align-content: start; }
.st-dt-top { display: flex; gap: 10px; align-items: flex-start; }
.st-dt-top h2 { flex: 1; margin: 0; font-size: 19px; overflow-wrap: anywhere; }
.st-rename { width: 30px; height: 30px; margin-left: 4px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text-2);
  display: inline-grid; place-items: center; vertical-align: middle; cursor: pointer; }
.st-rename:hover { background: var(--studio-soft); color: var(--studio); }
.st-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.st-dt-who { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--text-2); }
.st-dt-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-dt-act { display: flex; flex-wrap: wrap; gap: 8px; }
.st-note { margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; }
.st-note > .st-ic { margin-right: 4px; }
.st-note.bad { background: var(--bad-soft); color: var(--bad); } .st-note.warn { background: var(--warn-soft); color: var(--warn); }
.st-path { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.st-dt-info h3 { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 13px; color: var(--text-3); letter-spacing: .04em; }
.st-checks, .st-events { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.st-checks li { display: grid; grid-template-columns: 20px auto 1fr; gap: 6px; align-items: start; }
.st-checks li b { white-space: nowrap; }
.st-checks li span { color: var(--text-3); }
.st-checks li.ok > .st-ic { color: var(--ok); } .st-checks li.bad > .st-ic, .st-checks li.bad b { color: var(--bad); } .st-checks li.skip > .st-ic { color: var(--text-3); }
.st-events li { padding-left: 12px; border-left: 2px solid var(--border); }
.st-events time { display: block; font-size: 11.5px; color: var(--text-3); }
.st-events em { font-style: normal; color: var(--text-2); margin-left: 4px; }
.st-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
@media (max-width: 760px) { .st-dt { grid-template-columns: 1fr; max-height: none; } .st-dt-pic { min-height: 220px; } .st-detail { max-height: calc(100vh - 24px); overflow: auto; } }

/* 提交: 用在哪里 (2026-11-23) - five plain chips, the chosen one filled */
.st-uses { display: flex; flex-wrap: wrap; gap: 8px; }
.st-use { position: relative; }
.st-use input { position: absolute; opacity: 0; pointer-events: none; }
.st-use span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--line, #d0d4da); border-radius: 10px; cursor: pointer; font-weight: 600; }
.st-use input:checked + span { border-color: var(--accent, #2f5bea); background: var(--accent, #2f5bea); color: #fff; }
.st-use input:focus-visible + span { outline: 2px solid var(--accent, #2f5bea); outline-offset: 2px; }

/* ================================================================== 一张一张看 (2026-11-23): the darkroom
 * A neutral dark ground that does not tint the picture (as design tools have it), the picture is the page; the keys
 * are the only colour: 通过 blue-cyan, 要改 amber. */
.st-one-go { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 16px 20px; border: 0; border-radius: 14px;
  background: #1c1d20; color: #eef0f2; text-align: left; cursor: pointer; }
.st-one-go span { display: grid; gap: 2px; }
.st-one-go b { font-size: 18px; }
.st-one-go em { font-style: normal; font-size: 13px; color: #9aa3ad; }
.st-one-go:hover { background: #26282c; }
dialog.st-one { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #161719; color: #eef0f2; }
dialog.st-one::backdrop { background: #000; }
.so { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; height: 100vh; }
.so-top { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-bottom: 1px solid #2a2c30; }
.so-n { font: 600 15px/1 "DIN Alternate", "Bahnschrift", system-ui, sans-serif; color: #9aa3ad; }
.so-n b { font-size: 22px; color: #eef0f2; }
.so-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.so-who em { font-style: normal; font-size: 13px; color: #9aa3ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-goes { margin-left: auto; font-size: 14px; color: #c9ced4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.so-amber { color: #ffb020; }
.so-x { flex: none; width: 40px; height: 40px; border: 1px solid #2a2c30; border-radius: 10px; background: none; color: #eef0f2; cursor: pointer; }
.so-stage { display: grid; place-items: center; min-height: 0; padding: 16px; }
.so-pic { position: relative; display: inline-block; max-width: 100%; max-height: 100%; line-height: 0; }
.so-pic img, .so-pic video { max-width: calc(100vw - 32px); max-height: calc(100vh - 250px); object-fit: contain; }
.so-stage.fixing .so-pic { cursor: crosshair; outline: 2px dashed #ffb020; outline-offset: 6px; }
.so-hint { margin: 8px 0 0; font-size: 13px; color: #ffb020; }
.so-pin { position: absolute; z-index: 2; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 3px solid #ffb020; border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .45); pointer-events: none; }
.st-dt-pic { position: relative; }
.so-title { padding: 0 18px; text-align: center; }
.so-title h2 { margin: 0; font-size: 18px; }
.so-title p { margin: 4px 0 0; font-size: 13px; color: #9aa3ad; }
.so-keys { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 14px 18px 18px; }
.so-key { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border: 1px solid #2f3236; border-radius: 12px;
  background: #222428; color: #eef0f2; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
.so-key:hover:not(:disabled) { background: #2b2e33; }
.so-key:disabled { opacity: .35; cursor: default; }
.so-key.primary { border-color: #3dc8ff; background: #3dc8ff; color: #03202b; min-width: 160px; justify-content: center; }
.so-key.amber { border-color: #5a4310; color: #ffb020; }
.so-key kbd { padding: 1px 6px; border: 1px solid currentColor; border-radius: 5px; font: 600 11px/1.4 system-ui; opacity: .6; }
.so-key [data-ic], .so-key svg { flex: none; }
.so-key[data-so="prev"] svg { transform: rotate(180deg); }
.so-fix { display: grid; gap: 4px; justify-items: center; padding: 10px 18px 0; }
.so-fix textarea { width: min(720px, 100%); padding: 12px 14px; border: 1px solid #5a4310; border-radius: 12px; background: #1c1d20; color: #eef0f2; font: inherit; font-size: 16px; resize: none; }
.so-end { display: grid; place-items: center; align-content: center; gap: 10px; height: 100vh; text-align: center; }
.so-end h2 { margin: 0; font-size: 26px; }
.so-end p { margin: 0; color: #9aa3ad; }
.so-ok { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #34d27a; color: #062312; }
@media (max-width: 700px) {
  .so-top { flex-wrap: wrap; gap: 8px 12px; }
  .so-goes { order: 3; flex-basis: 100%; margin: 0; }
  .so-key { min-height: 48px; padding: 0 14px; font-size: 15px; }
  .so-key kbd { display: none; }
  .so-pic img, .so-pic video { max-height: calc(100vh - 300px); }
}

/* 素材库 (2026-11-23): what a 产品目录 holds; 未分类 as a to-do with the guessed products */
.st-fcard-uses { display: block; margin-top: 2px; font-size: 12px; color: var(--muted, #6b7280); }
.st-unfiled-go { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 14px 18px; border: 1px solid #f0c36b;
  border-radius: 14px; background: #fff8e8; color: #4a3500; text-align: left; cursor: pointer; }
.st-unfiled-go span { display: grid; gap: 2px; }
.st-unfiled-go b { font-size: 16px; }
.st-unfiled-go em { font-style: normal; font-size: 13px; color: #7a5a10; }
.st-guess { display: grid; gap: 8px; margin: 0 0 16px; }
.st-guess-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.st-guess-head span { font-size: 13px; color: var(--muted, #6b7280); }
.st-guess-head .btn { margin-left: auto; }
.st-guess-row { display: grid; grid-template-columns: 64px minmax(160px, 1fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 8px;
  border: 1px solid var(--line, #e3e6ea); border-radius: 12px; background: var(--panel, #fff); }
.st-guess-pic { display: grid; place-items: center; width: 64px; height: 64px; overflow: hidden; border-radius: 8px; background: #f1f3f5; }
.st-guess-pic img { width: 100%; height: 100%; object-fit: cover; }
.st-guess-t { display: grid; gap: 2px; min-width: 0; }
.st-guess-t b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.st-guess-t em { font-style: normal; font-size: 12px; color: var(--muted, #6b7280); }
.st-guess-ps { display: flex; flex-wrap: wrap; gap: 8px; }
.st-guess-p { display: flex; align-items: center; gap: 8px; max-width: 320px; padding: 6px 10px 6px 6px; border: 1px solid var(--line, #e3e6ea);
  border-radius: 10px; background: none; text-align: left; cursor: pointer; font: inherit; }
.st-guess-p img { flex: none; width: 36px; height: 36px; border-radius: 6px; object-fit: cover; }
.st-guess-p span { display: grid; min-width: 0; }
.st-guess-p small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; color: var(--muted, #6b7280); }
.st-guess-p em { margin-left: 4px; padding: 2px 10px; border-radius: 8px; background: var(--accent, #2f5bea); color: #fff; font-style: normal; font-weight: 700; }
.st-guess-p.first { border-color: var(--accent, #2f5bea); }
.st-guess-p:hover { background: #f4f6fb; }
@media (max-width: 700px) { .st-guess-row { grid-template-columns: 56px 1fr; } .st-guess-ps { grid-column: 1 / -1; } }

/* 看图的地方不带颜色 (2026-11-23): a picture is judged on neutral grey - the folder covers lose their lavender, and
 * the large picture of a work sits on the same dark grey as 一张一张看 (a dark checker shows transparency) */
.st-fcard-pic { background: #ececee; color: #6b7280; }
.st-dt-pic { background: #1c1d20 repeating-conic-gradient(#232428 0 25%, #1c1d20 0 50%) 0 0 / 20px 20px; }
.st-dt-pic video { max-width: 100%; }
@media (prefers-color-scheme: dark) { .st-fcard-pic { background: #26272a; color: #9aa3ad; } }

/* the old version line says v0.1.0 (the package number), not the release: 系统现在 above says which release runs */
#sys-slot .sys-meta > div:first-child { display: none; }
