/* ===== Topbar MS selector (custom dropdown) ===== */
.ms-topbar-wrap { position: relative; }
.ms-topbar-backdrop { display: none; }
.ms-topbar-dropdown { position: absolute; top: 100%; left: 0; margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); z-index: 100; min-width: 240px; max-height: 60vh; overflow-y: auto; }
.ms-topbar-item { display: block; width: 100%; padding: 10px 16px; border: none; background: none; color: var(--text); font-size: 0.875rem; cursor: pointer; text-align: left; transition: all 0.15s; }
.ms-topbar-item:hover { background: var(--panel-2); }
.ms-topbar-item.active { color: var(--accent); background: var(--bg); font-weight: bold; }

/* ===== Panel-inline dropdown (固定相方等) ===== */
.panel-select-wrap { position: relative; margin-bottom: 14px; }
.panel-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--text); font-size: 0.9375rem; cursor: pointer; transition: all 0.2s; text-align: left; }
.panel-select-trigger:hover, .panel-select-trigger:focus { border-color: var(--accent); background: var(--panel-2); }
.panel-select-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.panel-select-dropdown { position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-pop); z-index: 100; max-height: 60vh; overflow-y: auto; }
/* ドロップダウン内の絞り込み入力（項目が多いとき表示）。スクロールしても上部に固定 */
.panel-select-search { position: sticky; top: 0; z-index: 1; width: 100%; box-sizing: border-box; padding: 9px 14px; border: none; border-bottom: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 0.875rem; }
.panel-select-search:focus { outline: none; }
.panel-select-empty { padding: 12px 16px; color: var(--muted); font-size: 0.875rem; text-align: center; }
.panel-select-check { color: var(--accent); font-weight: 700; }
.panel-select-item { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 12px 16px; border: none; background: none; color: var(--text); font-size: 0.875rem; cursor: pointer; text-align: left; transition: all 0.15s; }
.panel-select-item:hover { background: var(--panel-2); }
.panel-select-item.active { color: var(--accent); background: var(--bg); font-weight: bold; }
.popover-backdrop { display: none; }
