#set-pop { position: fixed; inset: 0; z-index: 40; background: var(--scrim); display: grid; place-items: center; padding: 3vh 3vw; }
#set-pop[hidden] { display: none; }
.set-card { width: min(1080px, 100%); height: min(720px, 94vh); display: flex; flex-direction: column; background: var(--bg); border-radius: 14px; box-shadow: 0 12px 48px var(--pop-shadow); overflow: hidden; }
.set-head { display: flex; align-items: center; justify-content: space-between; height: 48px; flex: none; padding: 0 8px 0 16px; border-bottom: 1px solid var(--line); color: var(--heading); }
.set-main { flex: 1; min-height: 0; display: flex; }
.set-nav { width: 184px; flex: none; overflow: auto; padding: 10px 8px; display: grid; gap: 2px; align-content: start; background: var(--chip); border-right: 1px solid var(--line); }
.set-nav button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 8px; font-size: 13px; color: var(--fg); }
.set-nav button:hover { background: var(--hover); }
.set-nav button.on { background: var(--accent-tint); color: var(--accent-dark); font-weight: 600; }
.set-cap { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--subtle); }
.set-nav .set-cap { margin: 12px 0 2px; padding: 8px 10px 0; border-top: 1px solid var(--line); }
.set-body { flex: 1; min-width: 0; overflow: auto; padding: 18px 24px 28px; display: grid; gap: 12px; align-content: start; font-size: 13px; }
.set-body h2 { margin: 0 0 2px; font-size: 16px; color: var(--heading); }
.set-body .plancard { border: 0; padding: 0; }
.set-form { display: grid; gap: 8px; max-width: 520px; }
.set-f { display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 30px; }
.set-f > span:first-child { font-size: 12px; color: var(--muted); }
.set-f input { font: inherit; font-size: 13px; padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--fg); }
.set-f input:focus { outline: none; border-color: var(--accent); }
.set-form .acts { margin: 4px 0 0 94px; }
.set-as { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; line-height: 1.5; }
.set-as.on { border-color: var(--accent-tint-line); background: var(--warm); }
.set-as b { color: var(--heading); margin-right: 8px; }
.set-as .dim { font-size: 12px; color: var(--muted); }
.set-as button { flex: none; }
.set-ok { color: var(--v-ok); font-size: 12px; }
.set-sep { border-top: 1px solid var(--line); margin: 6px 0 2px; }
.set-pre { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--chip); font: inherit; font-size: 12px; line-height: 1.6; white-space: pre-wrap; max-width: 520px; }
.set-scroll { overflow-x: auto; }
.set-table { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
.set-table th { text-align: left; font-weight: 600; color: var(--muted); padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
.set-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.set-table .num { text-align: right; }
.set-table .set-tag { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); user-select: all; }
.set-table tr.off td { color: var(--subtle); }
.set-table select { font: inherit; font-size: 12px; padding: 2px 4px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--bg); color: var(--fg); }

.side-foot { padding: 8px 0 0; }
.side-foot #me-name { border: 0; background: none; width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; color: var(--fg); font-size: 13px; text-align: left; min-width: 0; }
.side-foot #me-name:hover { background: var(--hover); }
.side-foot .mwho { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.side-foot .mname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--heading); }
.side-foot .mrole { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ava { width: 30px; height: 30px; border-radius: 999px; flex: none; display: inline-grid; place-items: center; overflow: hidden; background: var(--accent-tint); color: var(--accent-dark); font-size: 11px; font-weight: 700; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ava.big { width: 72px; height: 72px; font-size: 24px; }
.set-ava { display: flex; align-items: center; gap: 16px; margin-bottom: 4px; }
.set-ava .acts { margin: 0 0 4px; }

@media (max-width: 640px) {
  #set-pop { padding: 0; }
  .set-card { height: 100%; border-radius: 0; }
  .set-main { flex-direction: column; }
  .set-nav { width: auto; display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .set-nav button { white-space: nowrap; }
  .set-nav .set-cap { display: none; }
  .set-form .acts { margin-left: 0; }
}
