/* เมนูกดค้างแบบ iOS (x-ctxmenu.js) — ฉากหลังเบลอ การ์ดยกขึ้น เมนูแผ่นมนโปร่ง */
.cm-ov { position:fixed; inset:0; z-index:65; -webkit-tap-highlight-color:transparent; touch-action:none; }
.cm-bg { position:absolute; inset:0; background:rgba(0,0,0,.32); -webkit-backdrop-filter:blur(16px) saturate(1.3); backdrop-filter:blur(16px) saturate(1.3);
  opacity:0; transition:opacity .25s ease; }
html[data-theme="light"] .cm-bg { background:rgba(0,0,0,.14); }
.cm-lift { position:fixed; pointer-events:none; transform:none; transition:transform .32s cubic-bezier(.3,1.3,.5,1), box-shadow .3s ease;
  box-shadow:0 0 0 rgba(0,0,0,0); will-change:transform; }
.cm-lift.cm-fill { background:var(--card); overflow:hidden; }
.cm-lift.cm-fill .row::before { display:none; }   /* เส้นคั่นแถวของลิสต์ ไม่ต้องติดมากับสำเนา */
.cm-ov.on .cm-bg { opacity:1; }
.cm-ov.on .cm-lift { transform:var(--cm-lift, scale(1.03)); box-shadow:0 14px 44px rgba(0,0,0,.55); }
html[data-theme="light"] .cm-ov.on .cm-lift { box-shadow:0 14px 44px rgba(0,0,0,.18); }
.cm-menu { position:fixed; touch-action:pan-y; border-radius:24px; padding:6px 0; overflow:hidden; max-height:calc(100% - 24px); overflow-y:auto;
  background:rgba(40,40,44,.74); -webkit-backdrop-filter:blur(30px) saturate(1.8); backdrop-filter:blur(30px) saturate(1.8);
  box-shadow:0 18px 50px rgba(0,0,0,.45), inset 0 0 0 .5px rgba(255,255,255,.14);
  opacity:0; transform:scale(.4); transition:transform .3s cubic-bezier(.25,1.25,.45,1), opacity .18s ease; }
html[data-theme="light"] .cm-menu { background:rgba(246,246,248,.8); box-shadow:0 18px 50px rgba(0,0,0,.2), inset 0 0 0 .5px rgba(0,0,0,.08); }
.cm-ov.on .cm-menu { opacity:1; transform:none; }
.cm-ov.off { pointer-events:none; }   /* กำลังปิด = แตะทะลุไปหน้าข้างหลังได้เลย */
.cm-ov.off .cm-menu { transition:transform .18s ease, opacity .14s ease; }
.cm-ov.off .cm-bg { transition:opacity .18s ease; }
.cm-title { padding:9px 20px 7px; font-size:13px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-item { display:flex; align-items:center; gap:14px; width:100%; min-height:46px; padding:10px 20px; border:0; background:none; color:var(--ink);
  font:inherit; font-size:17px; line-height:1.25; text-align:left; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.cm-item > i { flex:none; width:24px; font-size:21px; text-align:center; color:var(--ink-2); }
.cm-item .cm-lb { flex:1; min-width:0; }
.cm-item small { display:block; margin-top:2px; font-size:13px; color:var(--muted); }
.cm-item.danger, .cm-item.danger > i { color:var(--red); }
.cm-item.hl, .cm-item:active { background:rgba(255,255,255,.12); }
html[data-theme="light"] .cm-item.hl, html[data-theme="light"] .cm-item:active { background:rgba(0,0,0,.07); }
@media (hover:hover) { .cm-item:hover { background:rgba(255,255,255,.08); } html[data-theme="light"] .cm-item:hover { background:rgba(0,0,0,.05); } }
.cm-sep { height:1px; margin:5px 20px; background:rgba(255,255,255,.12); }
html[data-theme="light"] .cm-sep { background:rgba(0,0,0,.1); }
.cm-menu.cm-loading { min-height:48px; }
.cm-wait { display:grid; place-items:center; height:48px; color:var(--muted); font-size:20px; }
.cm-wait i { animation:cm-spin .8s linear infinite; }
@keyframes cm-spin { to { transform:rotate(360deg); } }
.cm-hap { position:fixed; left:-200px; top:0; width:1px; height:1px; opacity:0; pointer-events:none; overflow:hidden; }
@media (prefers-reduced-motion:reduce) {
  .cm-bg, .cm-lift, .cm-menu { transition:none !important; }
  .cm-ov.on .cm-lift { transform:var(--cm-lift, none); }
}
