/* 命册名单（mingce_swipe.js）。移植自 arc-library registry/components/swipe-actions（MIT，© 2026 Elia Kuratli，许可见 LICENSES/arc-library-MIT.txt）。
   颜色换站里变量（742 色库）：原件 --foreground→--text、--text-secondary→--text-soft、--surface-muted→--surface-2、--accent→--primary。
   卡面走全站 glass card（--gc-*）：动作层只占滑开露出的那一段，跟内容从不重叠，所以内容不用不透明底。原件 12px 的字抬到 13（站里小灰字最小 13）。 */
.mcs{container:mcs/inline-size;margin:0 0 20px;min-width:0;color:var(--text);font-size:14px;line-height:1.4}
.mcs *,.mcs ::before,.mcs ::after{box-sizing:border-box}
.mcs-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.mcs-h{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 4px 12px}
.mcs-h h2{display:inline-flex;align-items:baseline;gap:8px;margin:0;font-size:16px;font-weight:500;line-height:1.4;white-space:nowrap}
.mcs-count{color:var(--text-muted);font-size:13px;font-weight:400;font-variant-numeric:tabular-nums}
.mcs-search{display:flex;width:min(220px,100%);height:32px;align-items:center;gap:8px;border:1px solid var(--border-strong);border-radius:8px;
  padding:0 4px 0 11px;background:var(--surface);color:var(--text-muted);cursor:text;transition:border-color .16s cubic-bezier(.22,1,.36,1)}
.mcs-search:focus-within{border-color:color-mix(in oklab,var(--text-muted) 40%,var(--border-strong))}
.mcs-search>svg{flex:0 0 auto}
/* 16px：iOS 输入框字小于 16 一点就整页放大 */
.mcs-search input{min-width:0;height:100%;flex:1 1 0%;border:0;outline:0;padding:0;background:transparent;color:var(--text);font:inherit;font-size:16px}
.mcs-search input::placeholder{color:var(--text-muted);font-size:13px}
.mcs-search input::-webkit-search-cancel-button{display:none}
.mcs-clear{display:grid;width:24px;height:24px;flex:0 0 auto;place-items:center}
.mcs-clear button{display:grid;width:24px;height:24px;place-items:center;border:0;border-radius:50%;padding:0;background:transparent;color:var(--text-muted);cursor:pointer}
.mcs-clear button[hidden]{display:none}
.mcs-surface{overflow:hidden;border-radius:16px;background-color:var(--gc-fill);border:1px solid var(--gc-edge);box-shadow:var(--gc-shadow);-webkit-backdrop-filter:var(--gc-blur);backdrop-filter:var(--gc-blur)}
.mcs.is-empty .mcs-surface{display:none}
.mcs-surface:not(:has(> .mcs-list > .mcs-row:not([data-removing]))){background-color:transparent;border-color:transparent;box-shadow:none}
.mcs-list{margin:0 0 -1px;padding:0;list-style:none}
.mcs-list:focus-visible{outline:none}
.mcs-row{position:relative;isolation:isolate;overflow:hidden}
.mcs-row[hidden]{display:none}
/* 内容只走 transform，竖着划还是滚页面 */
.mcs-content{position:relative;z-index:10;display:flex;min-height:64px;align-items:center;gap:8px;padding:12px 8px 12px 16px;touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.mcs-content::after{position:absolute;right:0;bottom:0;left:16px;height:1px;background:var(--border);content:"";pointer-events:none}
.mcs-content img{-webkit-user-drag:none}
.mcs-body{display:flex;min-width:0;flex:1 1 auto;align-items:center;gap:12px;color:inherit;text-decoration:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent}
.mcs-body:focus-visible{outline:2px solid var(--primary);outline-offset:2px;border-radius:8px}
.mcs-ava{display:grid;width:36px;height:36px;flex:0 0 auto;place-items:center;overflow:hidden;border-radius:50%;background:var(--surface-2);color:var(--text-soft);font-size:15px}
.mcs-ava img{display:block;width:100%;height:100%;object-fit:cover}
.mcs-ava b{font-weight:500}
.mcs-tx{display:grid;min-width:0;gap:1px}
.mcs-nm{display:flex;align-items:center;gap:6px;overflow:hidden;font-weight:500;white-space:nowrap;text-overflow:ellipsis}
.mcs-pin{display:inline-grid;flex:0 0 auto;color:var(--primary)}
.mcs-role{overflow:hidden;color:var(--text-muted);font-size:13px;white-space:nowrap;text-overflow:ellipsis}
.mcs-more{display:grid;width:32px;height:32px;flex:none;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:color .16s cubic-bezier(.22,1,.36,1),background-color .16s cubic-bezier(.22,1,.36,1)}
/* 这颗钮开菜单：按下只变色，不缩放 */
.mcs-more:active,.mcs-more[data-state="open"]{background:var(--surface-2);color:var(--text)}
.mcs-more:focus-visible{outline:2px solid var(--primary);outline-offset:-2px}
@media (hover:hover) and (pointer:fine){
  .mcs-content{cursor:grab}
  .mcs-more:hover{background:var(--surface-2);color:var(--text)}
}
.mcs-row[data-dragging] .mcs-content{cursor:grabbing}
.mcs-row[data-dragging] .mcs-more{background:transparent;color:var(--text-muted)}
/* 每个动作铺满整行、藏在行外，靠 transform 滑进来；外侧的压在内侧上面 */
.mcs-layer{position:absolute;top:0;bottom:0;width:100%;padding:0;border:0;background:color-mix(in oklab,var(--text) 20%,var(--surface));color:var(--text);font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.mcs-layer[data-side="trailing"]{left:100%}
.mcs-layer[data-side="leading"]{right:100%}
.mcs-layer[data-tone="accent"]{background:var(--primary);color:var(--surface)}
.mcs-layer[data-tone="danger"]{background:var(--danger);color:var(--surface)}
.mcs-layer:focus{outline:none}
.mcs-anchor{position:absolute;top:0;bottom:0;width:0}
.mcs-layer[data-side="trailing"] .mcs-anchor{left:0}
.mcs-layer[data-side="leading"] .mcs-anchor{right:0}
.mcs-glyph{position:absolute;top:0;bottom:0;left:calc(var(--swipe-action-width) / -2);display:flex;width:var(--swipe-action-width);flex-direction:column;align-items:center;justify-content:center;gap:3px}
.mcs-icon{display:grid;place-items:center;opacity:0}
.mcs-icon svg{width:20px;height:20px}
.mcs-label{font-size:13px;font-weight:500;line-height:1.4;white-space:nowrap;opacity:0}
.mcs-empty{padding:20px 4px;color:var(--text-muted);font-size:13px;text-align:center}
.mcs-empty p{margin:0 0 8px}
.mcs-empty button{border:0;background:none;padding:0;color:var(--primary);font:inherit;text-decoration:underline;cursor:pointer}
/* 菜单从触发钮长出来（挂在 body 下，压在底栏 z-index 50 之上） */
.mcs-menu{--menu-y:-5px;position:fixed;z-index:60;min-width:11rem;max-height:calc(100dvh - 24px);overflow:auto;padding:5px;border:1px solid var(--border-strong);border-radius:12px;background:var(--surface);box-shadow:var(--gc-shadow);color:var(--text);font-size:14px;line-height:1.4;outline:none}
.mcs-menu[data-side="top"]{--menu-y:5px}
.mcs-menu[data-state="open"]{animation:mcs-fade-in .16s cubic-bezier(.16,1,.3,1) both,mcs-rise-in .58s var(--arc-ease-spring) both}
.mcs-menu[data-state="closed"]{animation:mcs-out .12s cubic-bezier(.22,1,.36,1) both;pointer-events:none}
.mcs-menu[data-state="open"] .mcs-item{animation:mcs-item-in .24s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(min(var(--i,0),4) * 35ms)}
.mcs-item{position:relative;display:flex;min-height:44px;align-items:center;gap:10px;padding:0 11px;border-radius:8px;color:var(--text);cursor:pointer;outline:none;transition:background-color .12s cubic-bezier(.22,1,.36,1);-webkit-tap-highlight-color:transparent}
.mcs-item[data-highlighted]{background:var(--surface-2)}
.mcs-item[data-tone="danger"]{color:var(--danger)}
.mcs-item[data-tone="danger"][data-highlighted]{background:color-mix(in oklab,var(--danger) 8%,var(--surface))}
.mcs-item-ic{display:inline-flex;width:17px;flex:0 0 auto;color:var(--text-soft)}
.mcs-item-ic svg{width:16px;height:16px}
.mcs-item[data-tone="danger"] .mcs-item-ic{color:var(--danger)}
@keyframes mcs-fade-in{from{opacity:0}}
@keyframes mcs-rise-in{from{transform:translateY(var(--menu-y)) scale(.97)}}
@keyframes mcs-out{to{opacity:0;transform:translateY(calc(var(--menu-y) * .5)) scale(.985)}}
@keyframes mcs-item-in{from{opacity:0;transform:translateY(calc(var(--menu-y) * .4))}}
@keyframes mcs-fade-out{to{opacity:0}}
@media (prefers-reduced-motion:reduce){
  .mcs-more,.mcs-item{transition:none}
  .mcs-menu[data-state="open"]{animation:mcs-fade-in .12s linear both}
  .mcs-menu[data-state="closed"]{animation:mcs-fade-out .12s linear both}
  .mcs-menu[data-state="open"] .mcs-item{animation:none}
}
@container mcs (max-width:360px){.mcs-search{width:min(170px,100%)}}
