/*
 * DVTV-101 部材入力モーダル (v5.9.0)
 * 日報(111)のページ上に表示されるため、テーマCSS干渉を避ける高詳細度 + !important で自己完結。
 * レイアウトの肝: ヘッダー固定 / 本体のみスクロール / フッター(保存)固定。
 * → 本体がどれだけ長くても保存ボタンは必ず画面内に残る。
 * v5.9.0: 各行のオプション編集(敷設方法/塗装/天井/補給/撤去/支給)UIスタイルを追加。
 */

#dvtv-bzm-ov{
  position:fixed!important; inset:0!important; z-index:999999!important;
  background:rgba(15,23,42,.55)!important; backdrop-filter:blur(2px)!important;
  display:none!important; align-items:flex-end!important; justify-content:center!important;
  margin:0!important; padding:0!important;
}
#dvtv-bzm-ov.bzm-open{ display:flex!important; }

#dvtv-bzm{
  --bzm-accent:#6366f1; --bzm-accent2:#8b5cf6; --bzm-bg:#f8fafc; --bzm-card:#fff;
  --bzm-text:#1e293b; --bzm-sub:#64748b; --bzm-border:#e2e8f0; --bzm-radius:16px;
  box-sizing:border-box!important;
  display:flex!important; flex-direction:column!important;
  width:min(720px,100%)!important;
  /* 100dvh 対応端末では dvh、未対応は vh フォールバック */
  max-height:92vh!important; max-height:92dvh!important;
  background:var(--bzm-bg)!important; color:var(--bzm-text)!important;
  border-radius:var(--bzm-radius) var(--bzm-radius) 0 0!important;
  box-shadow:0 -8px 40px rgba(0,0,0,.3)!important;
  overflow:hidden!important; animation:bzm-slide .22s ease!important;
}
@keyframes bzm-slide{ from{transform:translateY(100%)} to{transform:translateY(0)} }
@media (min-width:760px){
  #dvtv-bzm-ov{ align-items:center!important; }
  #dvtv-bzm{ border-radius:var(--bzm-radius)!important; max-height:88vh!important; max-height:88dvh!important; }
  @keyframes bzm-slide{ from{transform:translateY(24px);opacity:0} to{transform:translateY(0);opacity:1} }
}

/* ── ヘッダー(固定) ── */
#dvtv-bzm .bzm-hd{
  flex:0 0 auto!important;
  display:flex!important; align-items:center!important; gap:10px!important;
  padding:14px 16px!important;
  background:linear-gradient(135deg,var(--bzm-accent),var(--bzm-accent2))!important;
  color:#fff!important;
}
#dvtv-bzm .bzm-hd-tt{ flex:1!important; font-weight:800!important; font-size:15px!important; line-height:1.3!important; }
#dvtv-bzm .bzm-hd-sub{ font-size:11px!important; opacity:.85!important; font-weight:600!important; }
#dvtv-bzm .bzm-x{
  flex:0 0 auto!important; width:34px!important; height:34px!important; border:none!important;
  background:rgba(255,255,255,.18)!important; color:#fff!important; border-radius:9px!important;
  font-size:18px!important; cursor:pointer!important; line-height:1!important;
}
#dvtv-bzm .bzm-x:hover{ background:rgba(255,255,255,.32)!important; }

/* ── 本体(ここだけスクロール) ── */
#dvtv-bzm .bzm-body{
  flex:1 1 auto!important; min-height:0!important;
  overflow-y:auto!important; -webkit-overflow-scrolling:touch!important;
  padding:14px 16px!important;
}

/* 検索バー */
#dvtv-bzm .bzm-tools{ display:flex!important; flex-wrap:wrap!important; gap:8px!important; margin-bottom:12px!important; }
#dvtv-bzm .bzm-tools button{
  flex:0 0 auto!important; border:none!important; border-radius:9px!important;
  padding:9px 14px!important; font-size:13px!important; font-weight:700!important; cursor:pointer!important;
  color:#fff!important; background:linear-gradient(135deg,var(--bzm-accent),var(--bzm-accent2))!important;
}
#dvtv-bzm .bzm-tools .bzm-btn-direct{ background:linear-gradient(135deg,#10b981,#059669)!important; }
#dvtv-bzm .bzm-tools button:hover{ filter:brightness(1.07)!important; }

/* 部材カード一覧 */
#dvtv-bzm .bzm-rows{ display:flex!important; flex-direction:column!important; gap:8px!important; }
#dvtv-bzm .bzm-empty{ text-align:center!important; color:var(--bzm-sub)!important; font-size:13px!important; padding:24px 0!important; }
#dvtv-bzm .bzm-row{
  background:var(--bzm-card)!important; border:1px solid var(--bzm-border)!important;
  border-radius:11px!important; padding:10px 12px!important;
  display:flex!important; flex-direction:column!important; gap:7px!important;
}
#dvtv-bzm .bzm-row-top{ display:flex!important; align-items:flex-start!important; gap:8px!important; }
#dvtv-bzm .bzm-row-nm{ flex:1!important; font-weight:700!important; font-size:13px!important; color:var(--bzm-text)!important; word-break:break-word!important; }
#dvtv-bzm .bzm-row-nm small{ color:var(--bzm-sub)!important; font-weight:500!important; }
#dvtv-bzm .bzm-row-del{
  flex:0 0 auto!important; width:26px!important; height:26px!important; border:1px solid #fca5a5!important;
  background:#fff5f5!important; color:#dc2626!important; border-radius:7px!important;
  cursor:pointer!important; font-size:13px!important; line-height:1!important; opacity:.7!important;
}
#dvtv-bzm .bzm-row-del:hover{ opacity:1!important; background:#fee2e2!important; }
#dvtv-bzm .bzm-row-fields{ display:flex!important; flex-wrap:wrap!important; gap:8px!important; align-items:center!important; }
#dvtv-bzm .bzm-fld{ display:flex!important; flex-direction:column!important; gap:2px!important; }
#dvtv-bzm .bzm-fld label{ font-size:10px!important; color:var(--bzm-sub)!important; font-weight:600!important; }
#dvtv-bzm .bzm-fld input{
  width:84px!important; padding:6px 8px!important; border:1px solid var(--bzm-border)!important;
  border-radius:7px!important; font-size:13px!important; background:#fff!important; color:var(--bzm-text)!important;
  box-sizing:border-box!important;
}
#dvtv-bzm .bzm-fld input.bzm-qty{ width:72px!important; font-weight:700!important; }
#dvtv-bzm .bzm-fld input.bzm-nm-in{ width:160px!important; }
#dvtv-bzm .bzm-row-sub{ font-size:12px!important; color:var(--bzm-sub)!important; font-weight:600!important; margin-left:auto!important; }
#dvtv-bzm .bzm-row-sub b{ color:var(--bzm-text)!important; }

/* マスタブラウズ（本体内パネル） */
#dvtv-bzm .bzm-browse{ margin-bottom:12px!important; }
#dvtv-bzm .bzm-search-in{
  width:100%!important; padding:10px 12px!important; border:1px solid var(--bzm-border)!important;
  border-radius:9px!important; font-size:14px!important; box-sizing:border-box!important; margin-bottom:8px!important;
  background:#fff!important; color:var(--bzm-text)!important;
}
#dvtv-bzm .bzm-bc{ display:flex!important; flex-wrap:wrap!important; gap:4px!important; margin-bottom:8px!important; font-size:12px!important; }
#dvtv-bzm .bzm-bc-item{ color:var(--bzm-accent)!important; cursor:pointer!important; font-weight:700!important; }
#dvtv-bzm .bzm-bc-sep{ color:var(--bzm-sub)!important; }
#dvtv-bzm .bzm-cards{ display:grid!important; grid-template-columns:repeat(auto-fill,minmax(140px,1fr))!important; gap:6px!important; }
#dvtv-bzm .bzm-card{
  background:var(--bzm-card)!important; border:1px solid var(--bzm-border)!important; border-radius:9px!important;
  padding:10px!important; cursor:pointer!important; font-size:13px!important; font-weight:600!important;
  display:flex!important; align-items:center!important; justify-content:space-between!important; gap:6px!important;
}
#dvtv-bzm .bzm-card:hover{ border-color:var(--bzm-accent)!important; background:rgba(99,102,241,.05)!important; }
#dvtv-bzm .bzm-hit{
  background:var(--bzm-card)!important; border:1px solid var(--bzm-border)!important; border-radius:9px!important;
  padding:9px 11px!important; cursor:pointer!important; display:flex!important; align-items:center!important;
  justify-content:space-between!important; gap:8px!important; margin-bottom:5px!important;
}
#dvtv-bzm .bzm-hit:hover{ border-color:var(--bzm-accent)!important; background:rgba(99,102,241,.05)!important; }
#dvtv-bzm .bzm-hit-nm{ flex:1!important; font-size:13px!important; font-weight:600!important; color:var(--bzm-text)!important; }
#dvtv-bzm .bzm-hit-nm small{ color:var(--bzm-sub)!important; font-weight:500!important; }
#dvtv-bzm .bzm-hit-pr{ font-size:12px!important; font-weight:700!important; color:var(--bzm-accent)!important; white-space:nowrap!important; }

/* ── フッター(固定・保存は常にここ) ── */
#dvtv-bzm .bzm-ft{
  flex:0 0 auto!important;
  display:flex!important; gap:10px!important; align-items:center!important;
  padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px))!important;
  background:var(--bzm-card)!important; border-top:1px solid var(--bzm-border)!important;
  box-shadow:0 -4px 16px rgba(0,0,0,.06)!important;
}
#dvtv-bzm .bzm-ft-info{ flex:1!important; font-size:12px!important; color:var(--bzm-sub)!important; font-weight:600!important; }
#dvtv-bzm .bzm-ft-info b{ color:var(--bzm-text)!important; }
#dvtv-bzm .bzm-ft button{
  border:none!important; border-radius:10px!important; padding:11px 18px!important;
  font-size:14px!important; font-weight:800!important; cursor:pointer!important;
}
#dvtv-bzm .bzm-cancel{ background:#f1f5f9!important; color:#475569!important; }
#dvtv-bzm .bzm-cancel:hover{ background:#e2e8f0!important; }
#dvtv-bzm .bzm-save{ background:linear-gradient(135deg,var(--bzm-accent),var(--bzm-accent2))!important; color:#fff!important; min-width:120px!important; }
#dvtv-bzm .bzm-save:hover{ filter:brightness(1.08)!important; }
#dvtv-bzm .bzm-save:disabled{ opacity:.55!important; cursor:not-allowed!important; }

/* トースト */
#dvtv-bzm .bzm-toast{
  position:absolute!important; left:50%!important; bottom:84px!important; transform:translateX(-50%)!important;
  background:#1e293b!important; color:#fff!important; padding:9px 16px!important; border-radius:9px!important;
  font-size:13px!important; font-weight:700!important; z-index:5!important; opacity:0!important; transition:.2s!important;
  pointer-events:none!important; max-width:90%!important; text-align:center!important;
}
#dvtv-bzm .bzm-toast.show{ opacity:1!important; }
#dvtv-bzm .bzm-toast.err{ background:#dc2626!important; }

/* ════════════════════════════════════════════
   オプション編集 (v5.9.0 段階2)
   ════════════════════════════════════════════ */
#dvtv-bzm .bzm-opt-bar{
  display:flex!important; align-items:center!important; flex-wrap:wrap!important;
  gap:6px!important; margin-top:8px!important;
}
#dvtv-bzm .bzm-opt-toggle{
  display:inline-flex!important; align-items:center!important; gap:4px!important;
  border:1px solid var(--bzm-border)!important; background:#f1f5f9!important;
  color:#475569!important; font-size:11.5px!important; font-weight:700!important;
  padding:5px 10px!important; border-radius:8px!important; cursor:pointer!important;
  line-height:1!important; transition:all .12s!important;
}
#dvtv-bzm .bzm-opt-toggle:hover{ background:#e2e8f0!important; color:#1e293b!important; }
#dvtv-bzm .bzm-row-optopen .bzm-opt-toggle{
  background:linear-gradient(135deg,var(--bzm-accent),var(--bzm-accent2))!important;
  color:#fff!important; border-color:transparent!important;
}
#dvtv-bzm .bzm-opt-caret{ font-size:9px!important; opacity:.85!important; }
#dvtv-bzm .bzm-opt-tags{ display:inline-flex!important; flex-wrap:wrap!important; gap:4px!important; }
#dvtv-bzm .bzm-tag{
  display:inline-flex!important; align-items:center!important;
  font-size:10.5px!important; font-weight:800!important; line-height:1!important;
  padding:4px 7px!important; border-radius:6px!important; white-space:nowrap!important;
}
#dvtv-bzm .bzm-tag-bg{ background:#e0e7ff!important; color:#4338ca!important; }
#dvtv-bzm .bzm-tag-ts{ background:#fce7f3!important; color:#be185d!important; }
#dvtv-bzm .bzm-tag-tt{ background:#ffedd5!important; color:#c2410c!important; }
#dvtv-bzm .bzm-tag-hk{ background:#f3e8ff!important; color:#7e22ce!important; }
#dvtv-bzm .bzm-tag-tj{ background:#ccfbf1!important; color:#0f766e!important; }
#dvtv-bzm .bzm-tag-sk{ background:#e2e8f0!important; color:#334155!important; }

/* パネル */
#dvtv-bzm .bzm-opt-panel{
  margin-top:8px!important; padding:10px!important;
  background:linear-gradient(180deg,#f8fafc,#f1f5f9)!important;
  border:1px solid var(--bzm-border)!important; border-radius:12px!important;
  display:flex!important; flex-direction:column!important; gap:8px!important;
}
#dvtv-bzm .bzm-opt-loading{ text-align:center!important; color:var(--bzm-sub)!important; font-size:12px!important; padding:10px 0!important; }
#dvtv-bzm .bzm-opt-loading.err{ color:#dc2626!important; }
#dvtv-bzm .bzm-opt-cat{
  font-size:11px!important; color:#0369a1!important; background:#e0f2fe!important;
  padding:6px 9px!important; border-radius:8px!important; font-weight:600!important;
}
#dvtv-bzm .bzm-opt-cat b{ color:#0c4a6e!important; }
#dvtv-bzm .bzm-opt-sec{
  background:var(--bzm-card)!important; border:1px solid var(--bzm-border)!important;
  border-radius:10px!important; padding:8px 10px!important;
}
#dvtv-bzm .bzm-opt-sec-t{ font-size:12px!important; font-weight:800!important; color:var(--bzm-text)!important; margin-bottom:6px!important; }
#dvtv-bzm .bzm-opt-sec-b{ display:flex!important; flex-direction:column!important; gap:6px!important; }
#dvtv-bzm .bzm-opt-row{ display:flex!important; align-items:center!important; flex-wrap:wrap!important; gap:8px!important; }
#dvtv-bzm .bzm-opt-inl{ display:inline-flex!important; align-items:center!important; gap:6px!important; font-size:11.5px!important; color:var(--bzm-sub)!important; font-weight:600!important; }
#dvtv-bzm .bzm-opt-now{ display:flex!important; align-items:center!important; gap:6px!important; font-size:11.5px!important; color:var(--bzm-sub)!important; font-weight:600!important; }
#dvtv-bzm .bzm-opt-hint{ font-size:10.5px!important; color:#94a3b8!important; }

/* パネル内の入力・セレクト */
#dvtv-bzm .bzm-opt-panel select,
#dvtv-bzm .bzm-opt-panel input[type="number"]{
  box-sizing:border-box!important; font-size:13px!important; font-weight:600!important;
  color:var(--bzm-text)!important; background:#fff!important;
  border:1.5px solid var(--bzm-border)!important; border-radius:8px!important;
  padding:7px 9px!important; height:auto!important; line-height:1.2!important; margin:0!important;
}
#dvtv-bzm .bzm-opt-panel select{ width:100%!important; }
#dvtv-bzm .bzm-opt-panel input[type="number"]{ width:110px!important; }
#dvtv-bzm .bzm-opt-panel select:focus,
#dvtv-bzm .bzm-opt-panel input[type="number"]:focus{
  outline:none!important; border-color:var(--bzm-accent)!important;
  box-shadow:0 0 0 3px rgba(99,102,241,.15)!important;
}

/* 塗装チェック */
#dvtv-bzm .bzm-opt-chks{ display:flex!important; flex-wrap:wrap!important; gap:6px!important; }
#dvtv-bzm .bzm-opt-chk{
  display:inline-flex!important; align-items:center!important; gap:5px!important;
  font-size:11.5px!important; font-weight:600!important; color:var(--bzm-text)!important;
  background:#fff!important; border:1.5px solid var(--bzm-border)!important;
  border-radius:8px!important; padding:5px 9px!important; cursor:pointer!important;
}
#dvtv-bzm .bzm-opt-chk small{ color:var(--bzm-sub)!important; font-weight:500!important; }
#dvtv-bzm .bzm-opt-chk input{ accent-color:var(--bzm-accent)!important; }
#dvtv-bzm .bzm-opt-tosou-calc{
  border:none!important; cursor:pointer!important; font-weight:800!important;
  font-size:12px!important; color:#fff!important; padding:8px 14px!important;
  border-radius:8px!important; line-height:1!important;
  background:linear-gradient(135deg,#ec4899,#db2777)!important;
}
#dvtv-bzm .bzm-opt-tosou-calc:hover{ filter:brightness(1.07)!important; }
#dvtv-bzm .bzm-opt-tosou-calc:disabled{ opacity:.6!important; cursor:default!important; }

/* ── 配線器具（v5.10.0） ── */
#dvtv-bzm .bzm-tools .bzm-btn-haisen{ background:linear-gradient(135deg,#8b5cf6,#6366f1)!important; }
#dvtv-bzm .bzm-row-haisen{ border-color:#c4b5fd!important; background:linear-gradient(180deg,rgba(139,92,246,.06),var(--bzm-card))!important; }
#dvtv-bzm .bzm-haisen-badge{
  display:inline-block!important; font-size:11px!important; font-weight:800!important; color:#fff!important;
  background:linear-gradient(135deg,#8b5cf6,#6366f1)!important; padding:2px 8px!important; border-radius:999px!important;
  margin-right:4px!important; vertical-align:middle!important;
}
#dvtv-bzm .bzm-haisen-edit{
  margin-left:auto!important; border:1px solid #c4b5fd!important; background:#f5f3ff!important; color:#6d28d9!important;
  border-radius:8px!important; padding:6px 12px!important; font-size:12px!important; font-weight:700!important; cursor:pointer!important;
}
#dvtv-bzm .bzm-haisen-edit:hover{ background:#ede9fe!important; }

/* ── ケーブル敷設方法ダイアログ（v5.10.1） ── */
.bzm-cable-ov{
  position:fixed!important; inset:0!important; z-index:1000002!important; display:none!important;
  align-items:center!important; justify-content:center!important; padding:16px!important;
  background:rgba(15,23,42,.55)!important; -webkit-backdrop-filter:blur(2px)!important; backdrop-filter:blur(2px)!important;
}
.bzm-cable-ov.show{ display:flex!important; }
.bzm-cable-box{
  width:100%!important; max-width:440px!important; background:#fff!important; border-radius:16px!important;
  overflow:hidden!important; box-shadow:0 20px 60px rgba(0,0,0,.35)!important;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif!important;
}
.bzm-cable-hd{
  display:flex!important; align-items:center!important; justify-content:space-between!important;
  padding:13px 16px!important; color:#fff!important; font-weight:800!important; font-size:15px!important;
  background:linear-gradient(135deg,#2563eb,#4f46e5)!important;
}
.bzm-cable-x{ background:rgba(255,255,255,.2)!important; color:#fff!important; border:none!important; border-radius:8px!important; width:28px!important; height:28px!important; cursor:pointer!important; font-size:15px!important; line-height:1!important; }
.bzm-cable-body{ padding:14px 16px!important; }
.bzm-cable-name{ font-size:14px!important; font-weight:700!important; color:#1e293b!important; margin-bottom:8px!important; }
.bzm-cable-warn{ font-size:12px!important; color:#dc2626!important; font-weight:600!important; margin-bottom:10px!important; }
.bzm-cable-list{ display:flex!important; flex-direction:column!important; gap:8px!important; margin-bottom:12px!important; }
.bzm-cable-opt{
  display:flex!important; align-items:center!important; gap:10px!important; padding:11px 13px!important;
  border:2px solid #e2e8f0!important; border-radius:11px!important; cursor:pointer!important; transition:border-color .12s,background .12s!important;
}
.bzm-cable-opt:hover{ border-color:#93c5fd!important; }
.bzm-cable-opt.sel{ border-color:#4f46e5!important; background:rgba(79,70,229,.06)!important; }
.bzm-cable-opt input{ accent-color:#4f46e5!important; width:16px!important; height:16px!important; }
.bzm-cable-nm{ flex:1!important; font-size:13px!important; font-weight:600!important; color:#1e293b!important; }
.bzm-cable-bg{ font-family:ui-monospace,monospace!important; font-weight:800!important; color:#4f46e5!important; font-size:13px!important; }
.bzm-cable-append{ display:flex!important; align-items:center!important; gap:6px!important; font-size:12px!important; color:#334155!important; background:#ecfdf5!important; border:1px solid #a7f3d0!important; border-radius:9px!important; padding:8px 10px!important; }
.bzm-cable-append input{ accent-color:#059669!important; }
.bzm-cable-ft{ display:flex!important; gap:8px!important; justify-content:flex-end!important; padding:12px 16px!important; border-top:1px solid #eef2f7!important; }
.bzm-cable-ft .bzm-cancel{ border:1px solid #cbd5e1!important; background:#fff!important; color:#475569!important; border-radius:10px!important; padding:9px 16px!important; font-weight:700!important; font-size:13px!important; cursor:pointer!important; }
.bzm-cable-ft .bzm-save{ border:none!important; background:linear-gradient(135deg,#2563eb,#4f46e5)!important; color:#fff!important; border-radius:10px!important; padding:9px 18px!important; font-weight:800!important; font-size:13px!important; cursor:pointer!important; }
.bzm-cable-ft .bzm-save:hover{ filter:brightness(1.07)!important; }

/* ============================================================
   v5.13.0: 分類並び替えモーダル (原版F038並び替え画面(素材))
   基底 #dvb-app .dvb-modal.dvb-show{display:block} より強い詳細度で flex 化
   ============================================================ */
#dvb-app #dvb-bunrui-modal { width:420px !important; max-width:92vw !important; max-height:80vh !important; padding:0 !important; overflow:hidden !important; }
#dvb-app #dvb-bunrui-modal.dvb-show { display:flex !important; flex-direction:column !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-head { display:flex !important; flex-direction:row !important; align-items:center !important; justify-content:space-between !important; gap:8px !important; padding:10px 14px !important; background:linear-gradient(135deg,#1a1a2e,#0f3460) !important; color:#fff !important; font-weight:700 !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-note { padding:8px 14px !important; font-size:11px !important; color:var(--c-text2,#64748b) !important; border-bottom:1px solid var(--c-border,#e2e8f0) !important; }
#dvb-app #dvb-bunrui-modal #dvb-bunrui-list { list-style:none !important; margin:0 !important; padding:8px !important; overflow-y:auto !important; flex:1 1 auto !important; min-height:120px !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item { display:flex !important; flex-direction:row !important; align-items:center !important; gap:8px !important; padding:8px 10px !important; margin:0 0 6px 0 !important; border:2px solid var(--c-border,#cbd5e1) !important; border-radius:8px !important; background:var(--c-input-bg,#fff) !important; color:var(--c-text,#1e293b) !important; cursor:grab !important; user-select:none !important; font-size:13px !important; transition:all .12s !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item:hover { border-color:#4c6ef5 !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item.is-selected { border-color:#e03131 !important; background:#fff5f5 !important; font-weight:700 !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item.is-dragging { opacity:.5 !important; cursor:grabbing !important; }
/* v5.14.0: pointer方式の並べ替え（タッチ対応）。挿入位置のガイド線 */
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item { touch-action:none !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item.dvb-drop-before { box-shadow:0 -3px 0 0 #4f46e5 !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-item.dvb-drop-after { box-shadow:0 3px 0 0 #4f46e5 !important; }
body.dvb-sorting { user-select:none !important; -webkit-user-select:none !important; }
body.dvb-sorting * { cursor:grabbing !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-grip { color:#94a3b8 !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-name { flex:1 1 auto !important; overflow:hidden !important; text-overflow:ellipsis !important; white-space:nowrap !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-cnt { font-size:11px !important; color:#4c6ef5 !important; background:#edf2ff !important; border-radius:10px !important; padding:1px 8px !important; }
#dvb-app #dvb-bunrui-modal .dvb-bunrui-foot { display:flex !important; flex-direction:row !important; align-items:center !important; gap:8px !important; padding:10px 14px !important; border-top:1px solid var(--c-border,#e2e8f0) !important; }
#dvb-app[data-theme="dark"] #dvb-bunrui-modal .dvb-bunrui-item.is-selected { background:#3b1f24 !important; }

/* ============================================================
   v5.14.0 共有モーダルの分類並び替え（101ページ版と同一デザイン）
   pointer方式のためPC・タッチ両対応
   ============================================================ */
#dvtv-bzm .bzm-tools .bzm-btn-bunrui{ background:linear-gradient(135deg,#0891b2,#0e7490)!important; }
.bzm-bs-ov{ position:fixed!important; inset:0!important; background:rgba(15,23,42,.55)!important;
  display:none!important; align-items:center!important; justify-content:center!important; z-index:2147483600!important; }
.bzm-bs-ov.bzm-bs-open{ display:flex!important; }
.bzm-bs-box{ width:min(94vw,480px)!important; max-height:86vh!important; display:flex!important; flex-direction:column!important;
  background:var(--c-card,#fff)!important; border-radius:14px!important; overflow:hidden!important;
  box-shadow:0 20px 60px rgba(0,0,0,.35)!important; }
.bzm-bs-hd{ display:flex!important; align-items:center!important; gap:8px!important; padding:12px 14px!important;
  background:linear-gradient(135deg,#1e3a8a,#312e81)!important; color:#fff!important; font-weight:800!important; font-size:14px!important; }
.bzm-bs-hd span{ flex:1!important; }
.bzm-bs-x{ border:0!important; background:rgba(255,255,255,.18)!important; color:#fff!important; width:28px!important; height:28px!important;
  border-radius:8px!important; cursor:pointer!important; font-size:14px!important; line-height:1!important; }
.bzm-bs-note{ padding:10px 14px!important; font-size:12px!important; color:var(--c-text2,#64748b)!important; line-height:1.6!important;
  background:var(--c-bg,#f8fafc)!important; }
#bzm-bs-list{ list-style:none!important; margin:0!important; padding:10px 14px!important; overflow:auto!important; flex:1!important; }
.bzm-bs-item{ display:flex!important; align-items:center!important; gap:8px!important; padding:9px 10px!important; margin:0 0 6px 0!important;
  border:2px solid var(--c-border,#cbd5e1)!important; border-radius:8px!important; background:var(--c-input-bg,#fff)!important;
  color:var(--c-text,#1e293b)!important; cursor:grab!important; user-select:none!important; touch-action:none!important; font-size:13px!important; }
.bzm-bs-item:hover{ border-color:#4c6ef5!important; }
.bzm-bs-item.is-selected{ border-color:#e03131!important; background:#fff5f5!important; font-weight:700!important; }
.bzm-bs-item.is-dragging{ opacity:.5!important; cursor:grabbing!important; }
.bzm-bs-item.bzm-drop-before{ box-shadow:0 -3px 0 0 #4f46e5!important; }
.bzm-bs-item.bzm-drop-after{ box-shadow:0 3px 0 0 #4f46e5!important; }
.bzm-bs-grip{ color:#94a3b8!important; }
.bzm-bs-nm{ flex:1!important; min-width:0!important; overflow:hidden!important; text-overflow:ellipsis!important; white-space:nowrap!important; }
.bzm-bs-cnt{ font-size:11px!important; color:#4c6ef5!important; background:#edf2ff!important; border-radius:10px!important; padding:1px 8px!important; }
.bzm-bs-ft{ display:flex!important; align-items:center!important; gap:8px!important; padding:10px 14px!important;
  border-top:1px solid var(--c-border,#e2e8f0)!important; }
.bzm-bs-btn{ border:1px solid var(--c-border,#cbd5e1)!important; background:var(--c-card,#fff)!important; color:var(--c-text,#1e293b)!important;
  border-radius:8px!important; padding:8px 14px!important; font-size:13px!important; font-weight:700!important; cursor:pointer!important; }
.bzm-bs-btn:hover{ border-color:#4c6ef5!important; }
.bzm-bs-go{ background:linear-gradient(135deg,#f59e0b,#d97706)!important; color:#fff!important; border-color:transparent!important; }
body.bzm-sorting{ user-select:none!important; -webkit-user-select:none!important; }
body.bzm-sorting *{ cursor:grabbing!important; }
