.export-popover { position:fixed; inset:var(--export-top,80px) var(--export-right,24px) auto auto; margin:0; width:360px; max-width:calc(100vw - 32px); max-height:calc(100dvh - 24px); overflow:auto; overscroll-behavior:contain; z-index:40; padding:16px; color:var(--ink); background:var(--caption-solid); border:1px solid var(--caption-edge); border-radius:20px; box-shadow:0 20px 50px #0003; font-size:12px; }
@supports(backdrop-filter:blur(20px)) { .export-popover { background:var(--caption-glass); backdrop-filter:blur(28px) saturate(1.2); -webkit-backdrop-filter:blur(28px) saturate(1.2); } }
.export-popover header,.export-row,.export-popover footer { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.export-popover h2 { font-size:17px; }
.export-popover header button { font-size:22px; padding:0; width:32px; }
.export-popover button { min-height:32px; padding:5px 10px; font-size:12px; }
.export-preview-wrap { display:grid; place-items:center; max-height:240px; overflow:auto; border:1px solid var(--line); margin:10px 0; background:var(--pill); border-radius:10px; }
.export-preview-wrap img { display:block; width:100%; height:auto; }
.export-preview-note { color:var(--muted); }
.export-popover fieldset { border:0; border-top:1px solid var(--line); padding:8px 0; margin:0; display:flex; flex-direction:column; gap:7px; min-width:0; }
.export-popover legend { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.06em; padding:0 6px 0 0; }
.export-popover label { display:flex; align-items:center; gap:8px; }
.export-popover input[type=checkbox] { accent-color:var(--accent); margin:0; }
.export-popover select,.export-popover input[type=number] { border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--ink); padding:5px 8px; min-height:30px; font:inherit; max-width:170px; }
.export-popover input[type=number] { width:70px; }
.export-hint,.export-status { color:var(--muted); font-size:10px; line-height:1.45; margin:3px 0; }
.export-status { font-variant-numeric:tabular-nums; min-height:15px; }
.export-segments { display:flex; gap:2px; padding:2px; border-radius:9px; background:var(--pill); }
.export-segments button { border:0; background:transparent; }
.export-segments button[aria-pressed=true] { color:var(--accent); background:var(--card); }
.export-working { display:flex; align-items:center; gap:12px; }
.export-working progress { flex:1; }
.export-popover footer { gap:6px; margin:10px 0 6px; }
.export-popover footer button { flex:1; white-space:nowrap; }
.export-popover :focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
@media(max-width:650px) {
  .toolbar { flex-wrap:nowrap; }
  .toolbar button { padding-inline:4px; font-size:12px; }
  .export-popover { inset:auto 16px max(8px,env(safe-area-inset-bottom)) 16px; width:auto; max-height:calc(100dvh - 32px); border-radius:20px; }
  .export-preview-wrap { max-height:180px; }

}

/* Keep clipboard/download notices visible above the mobile sheet. */
#toast { z-index:50; }

.export-popover details { color:var(--muted); font-size:10px; overflow-wrap:anywhere; }
.export-popover summary { cursor:pointer; padding:5px 0; }
.export-popover [hidden] { display:none !important; }

.export-stepper { display:flex; align-items:center; gap:4px; }
.export-stepper button { padding:4px 7px; }
.export-stepper input[type=number] { width:52px; appearance:textfield; -moz-appearance:textfield; }
.export-stepper input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.export-stepper input[aria-invalid=true] { border-color:#c66b35; box-shadow:0 0 0 1px #c66b35; }
.export-stepper [data-testid=export-custom-all] { border:0; background:transparent; color:var(--accent); text-decoration:underline; }
