  /* ============================== A5: PASTE-TO-IMPORT ============================== */
  #importView{ z-index:170; } /* above #galleryView (160), below #testModal/#templatesModal (175) */
  .gal-import{ /* .gal-import is only a hook — everything else reuses .gal-blank verbatim */ }

  #builderNotice{
    display:none; min-height:40px; background:var(--brand-50); border-bottom:1px solid var(--brand-200);
    padding:9px 14px; align-items:center; gap:8px; flex-shrink:0;
  }
  #builderNotice button{ flex:none; white-space:nowrap; }
  #importBar .fullview-title > svg{ display:inline-flex; vertical-align:-2px; margin-right:4px; }
  .imp-sub{ text-wrap:pretty; }
  #builderNotice.show{ display:flex; }
  #builderNotice .nf-i{ color:var(--brand-600); flex:none; }
  #builderNotice .bn-text{ font-size:12.5px; color:var(--text-secondary); }
  #builderNotice button{ height:28px; padding:0 12px; border-radius:var(--r-control); font-size:12.5px; }

  #importBody{ max-width:900px; margin:0 auto; padding:28px 24px 60px; }

  /* ---- step 1: paste ---- */
  .imp-ta{
    width:100%; height:340px; resize:vertical; font:inherit; font-size:13.5px; line-height:1.7;
    padding:14px 16px; background:var(--surface-default); border:1px solid var(--border-control);
    border-radius:var(--r-control); color:var(--text-primary);
  }
  .imp-ta::placeholder{ color:var(--text-muted); white-space:pre-wrap; }
  .imp-ta:focus{ outline:2px solid var(--brand-600); outline-offset:1px; border-color:var(--brand-600); }
  .imp-counter{ text-align:right; font-size:12px; color:var(--text-muted); margin-top:8px; }
  .imp-counter-warn{ color:var(--warning-fg); }
  .imp-counter-error{ color:var(--error-fg); }
  .imp-hint{ background:var(--surface-subtle); border:1px solid var(--border-strong); border-radius:var(--r-card); padding:14px 16px; margin-top:18px; }
  .imp-hint-hd{ font-size:12.5px; font-weight:600; color:var(--text-primary); margin-bottom:8px; }
  .imp-hint ul{ margin:0; padding-left:18px; font-size:12.5px; line-height:1.6; color:var(--text-secondary); }
  .imp-hint li + li{ margin-top:5px; }
  .imp-actions{ display:flex; align-items:center; gap:10px; margin-top:18px; }
  .imp-actions-note{ font-size:12.5px; color:var(--text-muted); margin-right:auto; }
  #importView button:disabled{ opacity:.5; cursor:not-allowed; }

  /* ---- step 2: review (the trust step) ---- */
  .imp-head{ display:flex; align-items:flex-start; gap:16px; margin-bottom:16px; }
  .imp-head-left{ flex:1; min-width:0; }
  .imp-count{ font-size:18px; font-weight:600; letter-spacing:-0.01em; color:var(--text-primary); }
  .imp-sub{ font-size:12.5px; line-height:1.5; color:var(--text-secondary); margin-top:4px; }
  .imp-head-right{ margin-left:auto; flex:none; }
  .imp-name-label{ font-size:11px; line-height:13px; text-transform:uppercase; letter-spacing:.08em; font-stretch:var(--stretch-label); font-weight:600; color:var(--text-muted); margin-bottom:5px; }
  .imp-name-input{ width:280px; height:32px; border-radius:var(--r-control); font-size:13px; padding:0 10px; border:1px solid var(--border-control); background:var(--surface-default); color:var(--text-primary); }
  .imp-name-input:focus{ outline:2px solid var(--brand-600); outline-offset:1px; border-color:var(--brand-600); }

  .imp-pagebreak-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-secondary); margin:16px 0 14px; cursor:pointer; }
  .imp-pagebreak-row input{ accent-color:var(--brand-600); }
  .imp-ignored-note{ font-size:12px; color:var(--text-muted); margin-bottom:14px; }

  .imp-list{ background:var(--surface-default); border:1px solid var(--border-strong); border-radius:var(--r-card); overflow:hidden; }
  .imp-row{
    display:grid; grid-template-columns:28px 1fr 220px 92px 28px; gap:14px; align-items:center;
    padding:12px 16px; min-height:52px; border-top:1px solid var(--border-default);
  }
  .imp-row:first-child{ border-top:none; }
  .imp-row:hover{ background:var(--surface-subtle); }
  .imp-row-overlimit{ opacity:.55; }
  .imp-idx{ font-size:12.5px; color:var(--text-muted); text-align:right; font-variant-numeric:tabular-nums; }
  .imp-content{ min-width:0; }
  .imp-qlabel{ font-size:14px; line-height:1.45; color:var(--text-primary); }
  .imp-optline{
    font-size:12.5px; line-height:1.5; color:var(--text-secondary); margin-top:2px;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  .imp-optline-unused{ opacity:.5; }
  .imp-note{ font-size:12px; color:var(--text-muted); margin-top:3px; }
  .imp-chip{
    display:inline-block; font-size:11.5px; font-weight:600; padding:4px 10px; border-radius:var(--r-chip);
    background:var(--warning-bg); border:1px solid var(--warning-line); color:var(--warning-fg);
  }
  .imp-raw{ font-size:13px; color:var(--text-secondary); margin-top:4px; }
  .imp-type-select{ width:220px; height:32px; border-radius:var(--r-control); font-size:12.5px; padding:0 8px; border:1px solid var(--border-control); background:var(--surface-default); color:var(--text-primary); }
  .imp-req{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-secondary); cursor:pointer; white-space:nowrap; }
  .imp-req input{ accent-color:var(--brand-600); }
  .imp-req-disabled{ opacity:.45; cursor:default; }
  .imp-del{ width:28px; height:28px; border:none; background:transparent; color:var(--text-muted); border-radius:var(--r-control); display:flex; align-items:center; justify-content:center; padding:0; }
  .imp-del:hover{ background:var(--error-bg); color:var(--error-fg); border:none; }

  .imp-error-card{ background:var(--error-bg); border:1px solid var(--error-line); border-radius:var(--r-card); padding:16px; font-size:13px; color:var(--error-fg); }

  /* ---- 720px stacking rule (spec §8) — desktop-first, only needs to not break ---- */
  @media (max-width:720px){
    .imp-row{ grid-template-columns:24px 1fr; row-gap:10px; }
    .imp-row .imp-type-select{ grid-column:2; width:100%; }
    .imp-row .imp-req{ grid-column:2; }
    .imp-row .imp-del{ grid-column:2; justify-self:start; }
    .imp-head{ flex-wrap:wrap; }
    .imp-head-right{ margin-left:0; width:100%; }
    .imp-name-input{ width:100%; }
  }

  /* ============================== Google Forms mode — spec docs/specs/google-forms-import.md ============================== */
  .gf-step1{ display:flex; flex-direction:column; }
  .gf-label{ font-size:13px; font-weight:600; color:var(--text-primary); margin-bottom:8px; }
  .gf-link-row{ display:flex; gap:8px; align-items:stretch; }
  .gf-input{ flex:1; min-width:0; height:34px; box-sizing:border-box; font:inherit; font-size:14px; padding:0 12px; border:1px solid var(--border-control);
    border-radius:var(--r-control); background:var(--surface-default); color:var(--text-primary); }
  .gf-input:focus-visible{ outline:2px solid var(--brand-600); outline-offset:1px; }
  .gf-input-error{ border-color:var(--error-fg); }
  .gf-link-row .primary{ height:34px; white-space:nowrap; }
  .gf-help{ font-size:12.5px; line-height:18px; color:var(--text-secondary); margin-top:8px; }
  .gf-note{ font-size:12.5px; line-height:18px; color:var(--text-muted); margin-top:4px; }
  .gf-status{ font-size:12.5px; color:var(--text-secondary); margin-top:12px; }
  .gf-disclose{ align-self:flex-start; margin-top:20px; gap:6px; }
  .gf-disclose[aria-expanded="true"] .nf-i{ transform:rotate(180deg); }
  .gf-source{ margin-top:12px; }
  .gf-demo-hint{ margin:0 0 16px; font-size:13px; line-height:1.5; color:var(--text-secondary); }
  .gf-steps{ margin:0 0 12px; padding-left:20px; font-size:12.5px; line-height:1.6; color:var(--text-secondary); }
  .gf-ta{ height:160px; font-size:12.5px; }
  .gf-found{ display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--text-secondary); margin-top:8px; }
  .gf-found .nf-i{ color:var(--success-fg); flex:none; }
  .gf-error{ display:flex; gap:10px; align-items:flex-start; margin-top:12px; }
  .gf-error > .nf-i{ flex:none; margin-top:1px; }
  .gf-error-hd{ font-weight:600; }
  .gf-error-body{ margin-top:2px; }
  .gf-retry{ margin-top:10px; }
  /* review */
  .gf-sec-row{ display:flex; align-items:center; gap:10px; height:40px; padding:0 16px; background:var(--surface-subtle); border-top:1px solid var(--border-default); }
  .gf-sec-row:first-child{ border-top:0; }
  .gf-sec-n{ font-size:11px; line-height:13px; font-weight:600; font-stretch:var(--stretch-label); letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); white-space:nowrap; }
  .gf-sec-title{ flex:1; min-width:0; font-size:13px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .gf-sec-count{ font-size:12px; color:var(--text-muted); white-space:nowrap; }
  .gf-decides{ display:flex; align-items:center; gap:5px; font-size:12px; color:var(--logic-fg-strong); margin-top:2px; }
  .gf-h{ font-size:14px; font-weight:600; color:var(--text-primary); margin:24px 0 8px; }
  .gf-muted{ font-size:12.5px; color:var(--text-muted); }
  .gf-under{ font-size:12px; margin-top:8px; }
  .gf-logic-row{ display:grid; grid-template-columns:200px minmax(0, 1fr); gap:16px; padding:12px 16px; }
  .gf-logic-row + .gf-logic-row{ border-top:1px solid var(--border-default); }
  .gf-logic-title{ font-size:13px; font-weight:600; color:var(--text-primary); margin-top:2px; overflow-wrap:anywhere; }
  .gf-branch{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12.5px; line-height:18px; color:var(--text-secondary); }
  .gf-branch + .gf-branch, .imp-note + .gf-branch{ margin-top:6px; }
  .gf-branch b{ color:var(--text-primary); font-weight:600; }
  .gf-branch .nf-i{ color:var(--text-muted); flex:none; }
  .gf-changed{ padding:2px 8px; }
  #importBar .gf-bar-close .nf-i{ display:none; } /* desktop: the word only, as in A5; icon-only below 768 */
  .gf-nbo-row{ padding:10px 16px; font-size:12.5px; line-height:18px; color:var(--text-secondary); }
  .gf-nbo-row + .gf-nbo-row{ border-top:1px solid var(--border-default); }
  .gf-nbo-row b{ color:var(--text-primary); font-weight:600; }
  .gf-why{ color:var(--text-muted); }
  @media (max-width:767px){
    #importBody{ padding:20px 16px 48px; }
    .gf-link-row{ flex-direction:column; }
    .gf-input{ flex:none; width:100%; } /* stacked: keep its 34px height (flex:1 would squeeze it vertically) */
    .gf-link-row .primary{ width:100%; }
    #importBar .gal-bar-sub{ display:none; }
    #importBar .gf-bar-back, #importBar .gf-bar-close{ width:34px; height:34px; padding:0; justify-content:center; gap:0; }
    #importBar .gf-bar-txt{ display:none; }
    #importBar .gf-bar-back, #importBar .gf-bar-close{ flex:none; }
    #importBar .primary{ flex:none; white-space:nowrap; }
    #importBar .fullview-title{ min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    #importBar .gf-bar-close .nf-i{ display:inline-block; }
    .gf-logic-row{ grid-template-columns:1fr; gap:8px; }
  }

  /* a parenthesised hint like (0-10), and an arrow with its target, never break apart */
  .imp-nb{white-space:nowrap;}
  .gf-branch .imp-nb{display:inline-flex; align-items:center; gap:6px;} /* the arrow keeps its target, with the row's own spacing */

  /* ============================== OPEN A DOCUMENT (spec doc-import §2, §11) ============================== */
  .imp-drop{ display:grid; grid-template-columns:auto minmax(0,1fr) auto; column-gap:12px; align-items:center; min-height:72px; padding:14px 16px; margin-bottom:16px;
    background:var(--surface-default); border:1px dashed var(--border-control); border-radius:var(--r-card);
    transition:border-color var(--dur-1) var(--ease-step), background-color var(--dur-1) var(--ease-step); }
  .imp-drop > .nf-i{ color:var(--text-secondary); align-self:start; margin-top:1px; }
  .imp-drop.is-over{ border-style:solid; border-color:var(--brand-600); background:var(--brand-50); }
  .imp-drop.is-read{ border:1px solid var(--border-strong); }
  .imp-drop-text{ min-width:0; }
  .imp-drop-title{ font-size:13.5px; line-height:20px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .imp-drop-sub{ font-size:12.5px; line-height:18px; color:var(--text-secondary); }
  .imp-drop-note{ font-size:12.5px; line-height:18px; color:var(--text-muted); margin-top:2px; }
  .imp-choose, button.imp-review-again{ display:inline-flex; align-items:center; justify-content:center; gap:6px; height:34px; padding:0 14px; white-space:nowrap; cursor:pointer;
    border:1px solid var(--border-control); border-radius:var(--r-control); background:var(--surface-default); font-size:13px; font-weight:600; color:var(--text-primary); }
  .imp-choose:hover, button.imp-review-again:hover{ border-color:var(--text-secondary); background:var(--surface-sunken); }
  .imp-choose[aria-disabled="true"]{ opacity:.45; cursor:default; }
  .imp-choose:has(input:focus-visible){ outline:2px solid var(--brand-600); outline-offset:2px; }
  .imp-drop-btns{ display:flex; gap:8px; }
  .imp-doc-error{ margin:0 0 16px; }
  @media (prefers-reduced-motion: reduce){ .imp-drop{ transition:none; } }
  @media (max-width:767px){
    .imp-drop{ grid-template-columns:minmax(0,1fr); row-gap:12px; }
    .imp-drop > .nf-i{ display:none; }
    .imp-choose, button.imp-review-again{ width:100%; }
    .imp-drop-btns{ flex-direction:column; }
    .imp-actions{ flex-wrap:wrap; }
    .imp-actions-note{ flex-basis:100%; }
    .imp-actions > button{ flex:1; white-space:nowrap; }
  }
  /* the review, for a document (spec §11.2) */
  .gf-sec-title.is-synth{ font-weight:400; color:var(--text-muted); }
  .dm-tracked .nf-i{ color:var(--text-muted); }
  .gf-branch .imp-nb{ max-width:100%; min-width:0; }
  .gf-branch .imp-nb b{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  details.dm-other > summary{ display:flex; align-items:center; gap:6px; cursor:pointer; list-style:none; }
  details.dm-other > summary::-webkit-details-marker{ display:none; }
  details.dm-other > summary .nf-i{ margin-left:auto; flex:none; color:var(--text-muted); transition:transform var(--dur-1) var(--ease-step); }
  details.dm-other[open] > summary .nf-i{ transform:rotate(180deg); }
  details.dm-other > summary:focus-visible{ outline:2px solid var(--brand-600); outline-offset:-2px; border-radius:var(--r-control); }
  @media (prefers-reduced-motion: reduce){ details.dm-other > summary .nf-i{ transition:none; } }
  .dm-other-list{ margin:8px 0 0; padding:0; list-style:none; }
  .dm-other-list li{ font-size:12.5px; line-height:18px; color:var(--text-secondary); padding:6px 0; overflow-wrap:anywhere; }
  .dm-other-list li + li{ border-top:1px solid var(--border-default); }
  /* the count line takes focus when the review opens: the app's ring, only for keyboard focus */
  .imp-count:focus{ outline:none; }
  .imp-count:focus-visible{ outline:2px solid var(--brand-600); outline-offset:2px; border-radius:var(--r-control); }
  .imp-count{ width:fit-content; }
