/* MD_FILE_VERSION: 1.0.018 | CHANGED: 2026-05-08 11-09-56 */
/* Copyright Information
 * =====================
 * Copyright (c) 2026, The Scripps Research Institute
 * Developed by Dr. Gennadii Grabovyi
 */

/* Paste/about/settings/export/word panel styling and picker controls. */
  /* Paste Compounds Data: overlay footer controls on top of the textarea */
  .md-paste-wrap{
    position:relative;
  }
	  #pasteArea{
	    border:0;
	    background:transparent;
	    box-shadow:none;
	    /* Use the shared dashed-card resizer instead of the native textarea resize grip. */
	    resize:none;
	    min-height:var(--md-paste-area-min-h);
	    /* Align textarea content with the "Paste Compounds Data" legend text. */
	    padding:8px 10px 8px calc(var(--pane-fieldset-legend-left) + var(--pane-fieldset-legend-pad-x) - var(--pane-fieldset-pad-x));
	  }
  #pasteArea:focus{
    outline:0;
    /* No focus ring for Paste Compounds textarea (requested). */
    box-shadow:none;
  }
  .md-paste-wrap.md-drop-active #pasteArea{
    /* No drop highlight ring for Paste Compounds textarea (requested). */
    box-shadow:none;
  }
  .md-sheet-picker{
    position:absolute;
    right:4px;
    bottom:calc(18px + 32px + 8px);
    min-width:220px;
    max-width:320px;
    max-height: var(--md-sheet-picker-max-h, 40vh);
    padding:10px;
    border:1px solid var(--line-dark);
    border-radius:10px;
    background:var(--panel);
    box-shadow:0 12px 30px rgba(0,0,0,0.25);
    z-index:6;
    box-sizing:border-box;
    display:flex;
    flex-direction:column;
    overflow:hidden; /* only the options list should scroll */
  }
  .md-sheet-picker-title{
    flex:0 0 auto; /* never shrink the header when the picker hits max-height */
    font-weight:600;
    font-size:12px;
    line-height:1.2;
    color:var(--fg);
    margin-bottom:8px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .md-sheet-picker-list{
    display:flex;
    flex-direction:column;
    gap:6px;
    /* The list is the only flexible (shrinkable) region: keep title/search/actions
       at their intended heights even when the picker is constrained by max-height. */
    flex:1 1 auto;
    min-height:0; /* allow scrolling inside a flex column */
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:4px;
  }
  .md-sheet-picker-item{
    height:30px;
    padding:0 10px;
    flex:0 0 auto; /* prevent flexbox from shrinking items; list scrolls instead */
    border-radius:8px;
    border:1px solid var(--line-dark);
    background:var(--control-bg);
    color:var(--fg);
    text-align:left;
    cursor:pointer;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .md-sheet-picker-item:hover{
    background:rgba(148,163,184,0.14);
  }
  .md-paste-overlay{
    position:absolute;
    right:0;
    bottom:0;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
    z-index:5;
    /* Let textarea interactions (including the resize grip) pass through the overlay container. */
    pointer-events:none;
    /* Inset controls so they don't block the textarea resize corner. */
    padding:0px 20px 0px 0px;
  }
  .md-paste-overlay > *{ pointer-events:auto; }
  .md-paste-btn{ white-space:nowrap; }

	  /* ===== About pane ===== */
	  .md-about-body{
	    /* Match Data pane typography */
	    font-size:14px;
	    line-height:21px;
	    font-weight:400;
	  }
	  .md-about-row1{
	    display:flex;
	    align-items:center;
	    gap:10px;
	    width:100%;
	    flex-wrap:nowrap;
	    min-width:0;
	  }
	  .md-about-actions{
	    display:grid;
	    grid-template-columns:repeat(3, minmax(0, 1fr));
	    gap:10px;
	    width:100%;
	    align-items:stretch;
	  }
	  .md-about-search{
	    flex:1 1 auto;
	    min-width:120px; /* allow narrow panes without wrapping */
	    width:100%;
	  }
	  .md-about-actions .md-about-action-btn{
	    width:100%;
	  }
	  .md-about-nav{
	    display:inline-flex;
	    align-items:center;
	    gap:4px;
    padding:0 4px;
    border:1px solid var(--line-dark);
    border-radius:10px;
    background:var(--control-bg);
    height:30px;
  }
  .md-about-counter{
    font-size:10.5px;
    line-height:1;
    white-space:nowrap;
    user-select:none;
  }
	  .md-about-action-btn{
	    height:30px;
	    padding:0 12px;
	    border-radius:10px;
	    border:1px solid var(--line-dark);
	    background:transparent;
	    color:var(--fg);
	    font-family:Arial;
	    font-size:12px;
	    font-weight:500;
	    line-height:1;
	    cursor:pointer;
	    user-select:none;
	    white-space:nowrap;
	    text-decoration:none;
	    display:inline-flex;
	    align-items:center;
	    justify-content:center;
	    box-sizing:border-box;
	    transition:background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
	  }
  .md-about-action-btn:hover{
    background:rgba(148,163,184,0.14);
    transform:translateY(-1px);
  }
  .md-about-action-btn--icon{
    width:26px;
    min-width:26px;
    padding:0;
    border:0;
    background:transparent;
    font-size:18px;
    line-height:1;
    transform:none;
  }
  .md-about-action-btn--icon:hover{
    background:rgba(148,163,184,0.14);
    transform:none;
  }
  .md-about-action-btn--primary{
    height:32px;
    border-radius:8px;
    font-size:13px;
    background:var(--accent);
    border-color:transparent;
    color:#ffffff;
  }
  .md-about-action-btn--primary:hover{
    background:var(--accent);
    transform:none;
  }
	  .md-about-content{
	    /* Match Data pane typography (items inherit from body). */
	    font:inherit;
	  }
  .md-about-content code{
    font: 11.5px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    padding:1px 6px;
    border-radius:6px;
    border:1px solid var(--line);
    background:rgba(148,163,184,0.12);
    color:inherit;
    white-space:nowrap;
  }
  .md-about-author{
    border:0px dashed var(--line-dark);
    border-radius:var(--pane-fieldset-radius);
    padding:0px 0px 10px;
    background:var(--panel);
    margin-bottom:10px; /* keep spacing consistent with the section cards below */
  }
	  .md-about-author-title{
	    font-weight:inherit;
	    font-size:inherit;
	    letter-spacing:normal;
	  }
	  .md-about-author-credit{
	    margin-top:0px;
	    font-weight:inherit;
	  }
	  .md-about-author-sub{
	    margin-top:6px;
	    color:var(--muted);
	    font-size:inherit;
	  }
  .md-about-section{
    border:1px dashed var(--line-dark);
    border-radius:var(--pane-fieldset-radius);
    padding:10px 12px 12px;
    background:var(--panel);
  }
  .md-about-section + .md-about-section{
    margin-top:10px;
  }
	  .md-about-section > summary{
	    cursor:pointer;
	    user-select:none;
	    font-weight:600; /* match Data pane category headers (e.g., ASSAYS) */
	    font-size:inherit;
	    color:var(--fg);
	    padding:0;
	    margin:0;
	    outline:none;
	    list-style:none;
	  }
  .md-about-section > summary::marker{ content:""; }
  .md-about-section > summary::-webkit-details-marker{ display:none; }
  .md-about-section > summary::before{
    content:"▸";
    display:inline-block;
    width:16px;
    color:var(--muted);
    transform:translateY(-0.5px);
  }
  .md-about-section[open] > summary::before{
    content:"▾";
  }
  .md-about-section-body{
    margin-top:10px;
  }
	  .md-about-h4{
	    margin:12px 0 6px;
	    font-size:inherit;
	    font-weight:400;
	  }
  .md-about-log-version{
    margin:12px 0 6px;
    font-size:inherit;
    font-weight:400;
  }
  .md-about-log-section,
  .md-about-log-section *{
    font-weight:400 !important;
  }
  .md-about-formula-line{
    display:inline-block;
    max-width:100%;
    margin:2px 2px;
    padding:1px 6px;
    border:1px solid var(--line);
    border-radius:6px;
    background:rgba(148,163,184,0.12);
    color:inherit;
    font:11.5px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space:normal;
    overflow-wrap:anywhere;
    vertical-align:baseline;
  }
  .md-about-table-wrap{
    overflow:auto;
    border:1px solid var(--line-dark);
    border-radius:10px;
    background:var(--panel);
  }
	  .md-about-table{
	    width:100%;
	    border-collapse:separate;
	    border-spacing:0;
	    font-size:inherit;
	  }
  .md-about-table th,
  .md-about-table td{
    text-align:left;
    padding:8px 10px;
    border-bottom:1px solid var(--line);
    vertical-align:top;
    white-space:nowrap;
  }
	  .md-about-table th{
	    position:sticky;
	    top:0;
	    background:var(--panel);
	    z-index:2;
	    font-weight:400;
	  }
  .md-about-table tr:last-child td{ border-bottom:0; }
  .md-about-table td:first-child{ white-space:normal; }

  mark.md-about-mark{
    background:rgba(255, 208, 0, 0.25);
    color:inherit;
    border-radius:4px;
    padding:0 2px;
  }
  mark.md-about-mark.md-about-mark--active{
    background:rgba(255, 208, 0, 0.45);
    outline:2px solid rgba(255, 208, 0, 0.55);
    outline-offset:2px;
  }

  /* Settings pane groups (reusable) */
  .settings-card{
    border:0;
    padding:0;
    margin-bottom:0;
  }
  .settings-body{
    display:flex;
    flex-direction:column;
    gap:var(--pane-dashed-gap);
    /* Keep the first dashed fieldset aligned with other panes (no extra top offset). */
    padding:0 0 4px 0;
  }
  .settings-fieldset{
    position:relative;
    border:1px dashed var(--line-dark);
    border-radius:var(--pane-fieldset-radius);
    padding:var(--pane-fieldset-pad-top) var(--pane-fieldset-pad-x) var(--pane-fieldset-pad-bottom);
    box-sizing:border-box;
  }
  .settings-fieldset-title{
    position:absolute;
    top:0;
    left:var(--pane-fieldset-legend-left);
    transform:translateY(-50%);
    padding:0 var(--pane-fieldset-legend-pad-x) 1px;
    background:var(--panel);
    font-weight:var(--pane-fieldset-legend-font-weight);
    font-size:var(--pane-fieldset-legend-font-size);
    color:var(--fg);
    line-height:1.25;
    /* Allow up to two lines, then clip (no font shrinking). */
    white-space:normal;
    overflow:hidden;
    text-overflow:ellipsis;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    max-width:calc(100% - (var(--pane-fieldset-legend-left) * 2));
  }
	  .settings-fieldset-content{
	    display:flex;
	    flex-direction:column;
	    gap:10px;
	  }

	  /* Settings: Assays Data Settings */
	  .md-assays-refresh-btn{
	    width:100%;
	    height:32px;
	    padding:0 14px;
	    font-size:13px;
	    border-radius:8px;
	  }
	  .md-assays-refresh-status{
	    width:100%;
	    min-height:64px;
	    padding:12px 10px;
	    display:flex;
	    flex-direction:column;
	    align-items:center;
	    justify-content:center;
	    gap:6px;
	    text-align:center;
	    box-sizing:border-box;
	  }
	  .md-assays-refresh-status-line{
	    font-size:22px;
	    font-weight:500;
	    line-height:1.2;
	  }
	  .md-assays-refresh-status-meta{
	    font-size:12px;
	    max-width:100%;
	    overflow:hidden;
	    text-overflow:ellipsis;
	  }
	  .md-assays-refresh-error{
	    font-size:12px;
	    text-align:center;
	    white-space:normal;
	  }
	  .settings-seg-row{
	    display:flex;
	    flex-wrap:wrap;
	    gap:10px;
	  }
  .settings-seg-btn{
    height:32px;
    flex:1 1 110px;
    min-width:100px;
    padding:0 14px;
    border-radius:8px;
    border:1px solid var(--line-dark);
    background:transparent;
    color:var(--fg);
    font-size:13px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
    transition:background-color .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
  }
  /* Two-line variant (used by Structures Renderings control). */
  .settings-seg-btn--render{
    height:32px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0;
    line-height:1.1;
    overflow:hidden;
  }
  .settings-seg-sub{
    display:block;
    font-size:9px;
    line-height:1;
    color:var(--muted);
    opacity:0.75;
    font-weight:400;
    margin-top:1px;
    max-width:100%;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .settings-seg-btn.active .settings-seg-sub{
    color:rgba(255,255,255,0.85);
    opacity:0.95;
  }
  .settings-seg-btn:hover{
    background:rgba(148,163,184,0.14);
    transform:translateY(-1px);
  }
  .settings-seg-btn.active{
    background:var(--settings-active-bg);
    border-color:transparent; /* active has no visible border */
    color:#ffffff;
    transform:none;
  }
  .settings-seg-btn.active:hover{
    background:var(--settings-active-bg);
  }
  #exportFormatButtons .settings-seg-btn[data-export-format="json"].active,
  #exportFormatButtons .settings-seg-btn[data-export-format="txt"].active,
  #exportFormatButtons .settings-seg-btn[data-export-format="csv"].active,
  #exportFormatButtons .settings-seg-btn[data-export-format="xlsx"].active,
  #exportFormatButtons .settings-seg-btn[data-export-format="docx"].active,
  #exportFormatButtons .settings-seg-btn[data-export-format="sdf"].active,
  #exportScopeButtons .settings-seg-btn[data-export-scope="current"].active,
  #exportScopeButtons .settings-seg-btn[data-export-scope="all"].active,
  #wordColModeButtons .settings-seg-btn[data-word-colmode="custom"].active,
  #wordColModeButtons .settings-seg-btn[data-word-colmode="all"].active,
  #wordOrientationButtons .settings-seg-btn[data-word-orient="portrait"].active,
  #wordOrientationButtons .settings-seg-btn[data-word-orient="landscape"].active,
  #wordStructModeButtons .settings-seg-btn[data-word-structmode="smiles"].active,
  #wordStructModeButtons .settings-seg-btn[data-word-structmode="pictures"].active,
  #resModeButtons .settings-seg-btn[data-resmode="one"].active,
  #resModeButtons .settings-seg-btn[data-resmode="three"].active,
  #resModeButtons .settings-seg-btn[data-resmode="mixed"].active,
  #resModeButtons .settings-seg-btn[data-resmode="smiles"].active,
  #resModeButtons .settings-seg-btn[data-resmode="struct"].active,
  #structRenderButtons .settings-seg-btn[data-structrender="colored"].active,
  #structRenderButtons .settings-seg-btn[data-structrender="monochrome"].active,
  #structRenderButtons .settings-seg-btn[data-structrender="smiles"].active{
    box-sizing:border-box;
    background:transparent;
    border:3px solid #2563EB;
    color:var(--fg);
  }
  #exportFormatButtons .settings-seg-btn[data-export-format="json"].active:hover,
  #exportFormatButtons .settings-seg-btn[data-export-format="txt"].active:hover,
  #exportFormatButtons .settings-seg-btn[data-export-format="csv"].active:hover,
  #exportFormatButtons .settings-seg-btn[data-export-format="xlsx"].active:hover,
  #exportFormatButtons .settings-seg-btn[data-export-format="docx"].active:hover,
  #exportFormatButtons .settings-seg-btn[data-export-format="sdf"].active:hover,
  #exportScopeButtons .settings-seg-btn[data-export-scope="current"].active:hover,
  #exportScopeButtons .settings-seg-btn[data-export-scope="all"].active:hover,
  #wordColModeButtons .settings-seg-btn[data-word-colmode="custom"].active:hover,
  #wordColModeButtons .settings-seg-btn[data-word-colmode="all"].active:hover,
  #wordOrientationButtons .settings-seg-btn[data-word-orient="portrait"].active:hover,
  #wordOrientationButtons .settings-seg-btn[data-word-orient="landscape"].active:hover,
  #wordStructModeButtons .settings-seg-btn[data-word-structmode="smiles"].active:hover,
  #wordStructModeButtons .settings-seg-btn[data-word-structmode="pictures"].active:hover,
  #resModeButtons .settings-seg-btn[data-resmode="one"].active:hover,
  #resModeButtons .settings-seg-btn[data-resmode="three"].active:hover,
  #resModeButtons .settings-seg-btn[data-resmode="mixed"].active:hover,
  #resModeButtons .settings-seg-btn[data-resmode="smiles"].active:hover,
  #resModeButtons .settings-seg-btn[data-resmode="struct"].active:hover,
  #structRenderButtons .settings-seg-btn[data-structrender="colored"].active:hover,
  #structRenderButtons .settings-seg-btn[data-structrender="monochrome"].active:hover,
  #structRenderButtons .settings-seg-btn[data-structrender="smiles"].active:hover{
    background:rgba(37,99,235,0.08);
  }
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="json"].active,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="txt"].active,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="csv"].active,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="xlsx"].active,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="docx"].active,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="sdf"].active,
  :root[data-theme="dark"] #exportScopeButtons .settings-seg-btn[data-export-scope="current"].active,
  :root[data-theme="dark"] #exportScopeButtons .settings-seg-btn[data-export-scope="all"].active,
  :root[data-theme="dark"] #wordColModeButtons .settings-seg-btn[data-word-colmode="custom"].active,
  :root[data-theme="dark"] #wordColModeButtons .settings-seg-btn[data-word-colmode="all"].active,
  :root[data-theme="dark"] #wordOrientationButtons .settings-seg-btn[data-word-orient="portrait"].active,
  :root[data-theme="dark"] #wordOrientationButtons .settings-seg-btn[data-word-orient="landscape"].active,
  :root[data-theme="dark"] #wordStructModeButtons .settings-seg-btn[data-word-structmode="smiles"].active,
  :root[data-theme="dark"] #wordStructModeButtons .settings-seg-btn[data-word-structmode="pictures"].active,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="one"].active,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="three"].active,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="mixed"].active,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="smiles"].active,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="struct"].active,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="colored"].active,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="monochrome"].active,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="smiles"].active{
    border-color:#7AA2FF;
  }
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="json"].active:hover,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="txt"].active:hover,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="csv"].active:hover,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="xlsx"].active:hover,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="docx"].active:hover,
  :root[data-theme="dark"] #exportFormatButtons .settings-seg-btn[data-export-format="sdf"].active:hover,
  :root[data-theme="dark"] #exportScopeButtons .settings-seg-btn[data-export-scope="current"].active:hover,
  :root[data-theme="dark"] #exportScopeButtons .settings-seg-btn[data-export-scope="all"].active:hover,
  :root[data-theme="dark"] #wordColModeButtons .settings-seg-btn[data-word-colmode="custom"].active:hover,
  :root[data-theme="dark"] #wordColModeButtons .settings-seg-btn[data-word-colmode="all"].active:hover,
  :root[data-theme="dark"] #wordOrientationButtons .settings-seg-btn[data-word-orient="portrait"].active:hover,
  :root[data-theme="dark"] #wordOrientationButtons .settings-seg-btn[data-word-orient="landscape"].active:hover,
  :root[data-theme="dark"] #wordStructModeButtons .settings-seg-btn[data-word-structmode="smiles"].active:hover,
  :root[data-theme="dark"] #wordStructModeButtons .settings-seg-btn[data-word-structmode="pictures"].active:hover,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="one"].active:hover,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="three"].active:hover,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="mixed"].active:hover,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="smiles"].active:hover,
  :root[data-theme="dark"] #resModeButtons .settings-seg-btn[data-resmode="struct"].active:hover,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="colored"].active:hover,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="monochrome"].active:hover,
  :root[data-theme="dark"] #structRenderButtons .settings-seg-btn[data-structrender="smiles"].active:hover{
    background:rgba(122,162,255,0.12);
  }
  #structRenderButtons .settings-seg-btn[data-structrender="smiles"].active .settings-seg-sub{
    color:var(--muted);
    opacity:0.75;
  }
  .settings-hidden-select{
    display:none !important;
  }

  /* ===== Export pane (side dock) ===== */
  .md-export-actions{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
  }
  .md-export-scope{
    flex:1 1 220px;
  }
  .md-export-btn{
    height:32px;
    min-width:140px;
    padding:0 18px;
    border-radius:8px;
    border:1px solid var(--accent);
    background:var(--accent);
    color:#ffffff;
    font-size:13px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
    user-select:none;
    transition:filter .15s ease, transform .12s ease;
  }
  .md-export-btn:hover{
    transform:translateY(-1px);
    filter:brightness(1.04);
  }
  #btnExportDo{
    border-color:#15803D;
    background:#15803D;
    color:#ffffff;
  }
  #btnExportDo:disabled{
    border-color:color-mix(in srgb, #15803D 45%, #ffffff);
    background:color-mix(in srgb, #15803D 45%, #ffffff);
    color:rgba(255,255,255,0.9);
    opacity:1;
    cursor:not-allowed;
    transform:none;
    filter:none;
  }
  #btnExportDo:disabled:hover{
    transform:none;
    filter:none;
  }
  :root[data-theme="dark"] #btnExportDo{
    border-color:#16A34A;
    background:#16A34A;
  }
  :root[data-theme="dark"] #btnExportDo:disabled{
    border-color:color-mix(in srgb, #16A34A 42%, #2F3540);
    background:color-mix(in srgb, #16A34A 42%, #2F3540);
    color:rgba(255,255,255,0.82);
  }
  .md-export-btn:disabled{
    opacity:0.55;
    cursor:not-allowed;
    transform:none;
    filter:none;
  }
  .md-export-help,
  .md-export-lock{
    font-size:12px;
    margin-top:6px;
  }

  /* ===== Word (DOCX) export options ===== */
  .md-word-export{
    border:1px dashed var(--line-dark);
    border-radius:14px;
    padding:12px;
    background:rgba(148,163,184,0.08);
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  .md-word-export-title{
    font-weight:700;
    font-size:14px;
    color:var(--fg);
    line-height:1.1;
  }
  .md-word-export-row{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:flex-start;
  }
  .md-word-export-left{
    display:flex;
    flex-direction:column;
    gap:6px;
    flex:1 1 260px;
    min-width:220px;
  }
  .md-word-cols,
  .md-word-orient,
  .md-word-struct{
    gap:10px;
  }
  .md-word-orient{
    flex:1 1 220px;
    min-width:220px;
  }
  .md-word-struct{
    flex:1 1 320px;
    min-width:240px;
  }
  /* "Custom columns" button + hint stack (opens the picker directly). */
  .md-word-custom-wrap{
    /* Give the hint a bit more width than the "All columns" button so
       "Selected X/Y columns" usually stays on one line at the default pane size. */
    flex:2 1 150px;
    min-width:100px;
    display:flex;
    flex-direction:column;
    gap:4px;
  }
  .md-word-custom-wrap > .settings-seg-btn{
    flex:0 0 auto;
    width:100%;
  }
  .md-word-custom-wrap .md-word-cols-hint{
    padding:0; /* maximize usable width; centering happens via .md-word-cols-hint */
  }
  .md-word-cols-hint{
    font-size:12px;
    line-height:1.2;
    text-align:center;
  }
  .md-word-export-btn{
    height:32px;
    min-width:160px;
    padding:0 20px;
    border-radius:8px;
    border:1px solid var(--accent);
    background:var(--accent);
    color:#ffffff;
    font-size:13px;
    font-weight:500;
    line-height:1;
    cursor:pointer;
    user-select:none;
    transition:filter .15s ease, transform .12s ease;
    margin-left:auto; /* push to the right on its row */
  }
  .md-word-export-btn:hover{
    transform:translateY(-1px);
    filter:brightness(1.04);
  }
  #btnWordExportDo{
    border-color:#15803D;
    background:#15803D;
    color:#ffffff;
  }
  #btnWordExportDo:disabled{
    border-color:color-mix(in srgb, #15803D 45%, #ffffff);
    background:color-mix(in srgb, #15803D 45%, #ffffff);
    color:rgba(255,255,255,0.9);
    opacity:1;
    cursor:not-allowed;
    transform:none;
    filter:none;
  }
  #btnWordExportDo:disabled:hover{
    transform:none;
    filter:none;
  }
  :root[data-theme="dark"] #btnWordExportDo{
    border-color:#16A34A;
    background:#16A34A;
  }
  :root[data-theme="dark"] #btnWordExportDo:disabled{
    border-color:color-mix(in srgb, #16A34A 42%, #2F3540);
    background:color-mix(in srgb, #16A34A 42%, #2F3540);
    color:rgba(255,255,255,0.82);
  }
  .md-word-export-btn:disabled{
    opacity:0.55;
    cursor:not-allowed;
    transform:none;
    filter:none;
  }

  /* Mini picker (reuses sheet picker look; positioned near a button) */
  .md-sheet-picker.md-mini-picker{
    position:fixed;
    right:auto;
    bottom:auto;
    z-index:9999;
  }
  .md-sheet-picker.md-mini-picker.md-mini-picker--admin-resizable{
    min-width:280px;
    min-height:220px;
    max-width:min(90vw, 980px);
    max-height:min(85vh, 760px);
  }
  .md-sheet-picker.md-mini-picker.md-mini-picker--admin-resizable .md-sheet-picker-actions{
    padding-right:18px;
    padding-bottom:8px;
  }
  .md-mini-picker-resize-handle{
    position:absolute;
    right:-1px;
    bottom:-1px;
    width:22px;
    height:22px;
    border-radius:0 0 var(--pane-fieldset-radius) 0;
    opacity:0.9;
    cursor:nwse-resize;
    background:transparent;
    pointer-events:auto;
    touch-action:none;
  }
  .md-mini-picker-resize-handle::after{
    content:"";
    position:absolute;
    right:0;
    bottom:0;
    width:16px;
    height:16px;
    border-right:4px solid var(--line-dark);
    border-bottom:4px solid var(--line-dark);
    border-bottom-right-radius:calc(var(--pane-fieldset-radius) - 1px);
    box-sizing:border-box;
    pointer-events:none;
  }
  .md-mini-picker-resize-handle:hover{
    opacity:1;
  }
  body.md-mini-picker-resizing{
    cursor:nwse-resize;
    user-select:none;
  }
  body.md-mini-picker-resizing *{
    user-select:none;
  }
  .md-sheet-picker .md-sheet-picker-search{
    width:100%;
    height:30px;
    min-height:30px; /* prevent flexbox from squeezing the input in tall/scrolling pickers */
    flex:0 0 auto;
    padding:0 10px;
    border-radius:8px;
    border:1px solid var(--line-dark);
    background:var(--control-bg);
    color:var(--fg);
    box-sizing:border-box;
    margin-bottom:8px;
  }
  .md-sheet-picker-item.active{
    background:var(--settings-active-bg);
    border-color:transparent;
    color:#ffffff;
  }
  .md-sheet-picker-actions{
    flex:0 0 auto;
    display:flex;
    gap:8px;
    align-items:center;
    justify-content:space-between;
    margin-top:10px;
  }
  .md-sheet-picker-actions .left,
  .md-sheet-picker-actions .right{
    display:flex;
    gap:8px;
    align-items:center;
  }
  .md-sheet-picker-actions button{
    height:30px;
    padding:0 10px;
    border-radius:8px;
    border:1px solid var(--line-dark);
    background:var(--control-bg);
    color:var(--fg);
    cursor:pointer;
    user-select:none;
    transition:background-color .15s ease, transform .12s ease;
  }
  .md-sheet-picker-actions button:hover{
    background:rgba(148,163,184,0.14);
    transform:translateY(-1px);
  }
  .md-sheet-picker-actions button.primary{
    border-color:var(--accent);
    background:var(--accent);
    color:#ffffff;
  }
  .md-sheet-picker-actions button.primary:hover{
    background:var(--accent);
  }
